diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-06-24 16:16:33 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-07-05 07:51:41 +0000 |
| commit | 43308e1c80aef2d8edbca6752ab80583d7cec81c (patch) | |
| tree | 964a9bf04b0d4eae5cc6d969881cf62935e7686e | |
| parent | 5145b76b8a41b71a7b3c06373959c12f3a22014b (diff) | |
vendor: add batch client library
| -rw-r--r-- | go.mod | 1 | ||||
| -rw-r--r-- | go.sum | 2 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/LICENSE | 202 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/auxiliary.go | 270 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/batch_client.go | 1698 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/batchpb/batch.pb.go | 1382 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/batchpb/job.pb.go | 2898 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/batchpb/task.pb.go | 1927 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/batchpb/volume.pb.go | 413 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/doc.go | 121 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/gapic_metadata.json | 143 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/iam_policy_client.go | 1225 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/apiv1/version.go | 23 | ||||
| -rw-r--r-- | vendor/cloud.google.com/go/batch/internal/version.go | 20 | ||||
| -rw-r--r-- | vendor/modules.txt | 5 |
15 files changed, 10330 insertions, 0 deletions
@@ -4,6 +4,7 @@ go 1.21 require ( cloud.google.com/go v0.114.0 + cloud.google.com/go/batch v1.8.3 cloud.google.com/go/bigquery v1.60.0 cloud.google.com/go/logging v1.10.0 cloud.google.com/go/profiler v0.4.0 @@ -26,6 +26,8 @@ cloud.google.com/go/auth v0.4.2 h1:sb0eyLkhRtpq5jA+a8KWw0W70YcdVca7KJ8TM0AFYDg= cloud.google.com/go/auth v0.4.2/go.mod h1:Kqvlz1cf1sNA0D+sYJnkPQOP+JMHkuHeIgVmCRtZOLc= cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/batch v1.8.3 h1:b9fVZDxxp4LWMhXV7uAhyMGmPuzlzPrsZ0uh+RM92h8= +cloud.google.com/go/batch v1.8.3/go.mod h1:mnDskkuz1h+6i/ra8IMhTf8HwG8GOswSRKPJdAOgSbE= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= diff --git a/vendor/cloud.google.com/go/batch/LICENSE b/vendor/cloud.google.com/go/batch/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/cloud.google.com/go/batch/apiv1/auxiliary.go b/vendor/cloud.google.com/go/batch/apiv1/auxiliary.go new file mode 100644 index 000000000..e7311ae65 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/auxiliary.go @@ -0,0 +1,270 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package batch + +import ( + "context" + "time" + + batchpb "cloud.google.com/go/batch/apiv1/batchpb" + "cloud.google.com/go/longrunning" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// DeleteJobOperation manages a long-running operation from DeleteJob. +type DeleteJobOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteJobOperation) Metadata() (*batchpb.OperationMetadata, error) { + var meta batchpb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteJobOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteJobOperation) Name() string { + return op.lro.Name() +} + +// JobIterator manages a stream of *batchpb.Job. +type JobIterator struct { + items []*batchpb.Job + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*batchpb.Job, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *JobIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *JobIterator) Next() (*batchpb.Job, error) { + var item *batchpb.Job + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *JobIterator) bufLen() int { + return len(it.items) +} + +func (it *JobIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TaskIterator manages a stream of *batchpb.Task. +type TaskIterator struct { + items []*batchpb.Task + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*batchpb.Task, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TaskIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *TaskIterator) Next() (*batchpb.Task, error) { + var item *batchpb.Task + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TaskIterator) bufLen() int { + return len(it.items) +} + +func (it *TaskIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/batch_client.go b/vendor/cloud.google.com/go/batch/apiv1/batch_client.go new file mode 100644 index 000000000..b839f5b52 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/batch_client.go @@ -0,0 +1,1698 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package batch + +import ( + "bytes" + "context" + "fmt" + "io" + "math" + "net/http" + "net/url" + "time" + + batchpb "cloud.google.com/go/batch/apiv1/batchpb" + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + CreateJob []gax.CallOption + GetJob []gax.CallOption + DeleteJob []gax.CallOption + ListJobs []gax.CallOption + GetTask []gax.CallOption + ListTasks []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("batch.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("batch.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("batch.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://batch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + CreateJob: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetJob: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteJob: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ListJobs: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetTask: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListTasks: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultRESTCallOptions() *CallOptions { + return &CallOptions{ + CreateJob: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetJob: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteJob: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ListJobs: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetTask: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListTasks: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from Batch API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateJob(context.Context, *batchpb.CreateJobRequest, ...gax.CallOption) (*batchpb.Job, error) + GetJob(context.Context, *batchpb.GetJobRequest, ...gax.CallOption) (*batchpb.Job, error) + DeleteJob(context.Context, *batchpb.DeleteJobRequest, ...gax.CallOption) (*DeleteJobOperation, error) + DeleteJobOperation(name string) *DeleteJobOperation + ListJobs(context.Context, *batchpb.ListJobsRequest, ...gax.CallOption) *JobIterator + GetTask(context.Context, *batchpb.GetTaskRequest, ...gax.CallOption) (*batchpb.Task, error) + ListTasks(context.Context, *batchpb.ListTasksRequest, ...gax.CallOption) *TaskIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// Client is a client for interacting with Batch API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Google Batch Service. +// The service manages user submitted batch jobs and allocates Google Compute +// Engine VM instances to run the jobs. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateJob create a Job. +func (c *Client) CreateJob(ctx context.Context, req *batchpb.CreateJobRequest, opts ...gax.CallOption) (*batchpb.Job, error) { + return c.internalClient.CreateJob(ctx, req, opts...) +} + +// GetJob get a Job specified by its resource name. +func (c *Client) GetJob(ctx context.Context, req *batchpb.GetJobRequest, opts ...gax.CallOption) (*batchpb.Job, error) { + return c.internalClient.GetJob(ctx, req, opts...) +} + +// DeleteJob delete a Job. +func (c *Client) DeleteJob(ctx context.Context, req *batchpb.DeleteJobRequest, opts ...gax.CallOption) (*DeleteJobOperation, error) { + return c.internalClient.DeleteJob(ctx, req, opts...) +} + +// DeleteJobOperation returns a new DeleteJobOperation from a given name. +// The name must be that of a previously created DeleteJobOperation, possibly from a different process. +func (c *Client) DeleteJobOperation(name string) *DeleteJobOperation { + return c.internalClient.DeleteJobOperation(name) +} + +// ListJobs list all Jobs for a project within a region. +func (c *Client) ListJobs(ctx context.Context, req *batchpb.ListJobsRequest, opts ...gax.CallOption) *JobIterator { + return c.internalClient.ListJobs(ctx, req, opts...) +} + +// GetTask return a single Task. +func (c *Client) GetTask(ctx context.Context, req *batchpb.GetTaskRequest, opts ...gax.CallOption) (*batchpb.Task, error) { + return c.internalClient.GetTask(ctx, req, opts...) +} + +// ListTasks list Tasks associated with a job. +func (c *Client) ListTasks(ctx context.Context, req *batchpb.ListTasksRequest, opts ...gax.CallOption) *TaskIterator { + return c.internalClient.ListTasks(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with Batch API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client batchpb.BatchServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewClient creates a new batch service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Google Batch Service. +// The service manages user submitted batch jobs and allocates Google Compute +// Engine VM instances to run the jobs. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + client: batchpb.NewBatchServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type restClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions +} + +// NewRESTClient creates a new batch service rest client. +// +// Google Batch Service. +// The service manages user submitted batch jobs and allocates Google Compute +// Engine VM instances to run the jobs. +func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := append(defaultRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRESTCallOptions() + c := &restClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &Client{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://batch.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://batch.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://batch.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://batch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *restClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *restClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *restClient) Connection() *grpc.ClientConn { + return nil +} +func (c *gRPCClient) CreateJob(ctx context.Context, req *batchpb.CreateJobRequest, opts ...gax.CallOption) (*batchpb.Job, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateJob[0:len((*c.CallOptions).CreateJob):len((*c.CallOptions).CreateJob)], opts...) + var resp *batchpb.Job + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateJob(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) GetJob(ctx context.Context, req *batchpb.GetJobRequest, opts ...gax.CallOption) (*batchpb.Job, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetJob[0:len((*c.CallOptions).GetJob):len((*c.CallOptions).GetJob)], opts...) + var resp *batchpb.Job + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetJob(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeleteJob(ctx context.Context, req *batchpb.DeleteJobRequest, opts ...gax.CallOption) (*DeleteJobOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteJob[0:len((*c.CallOptions).DeleteJob):len((*c.CallOptions).DeleteJob)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteJob(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ListJobs(ctx context.Context, req *batchpb.ListJobsRequest, opts ...gax.CallOption) *JobIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListJobs[0:len((*c.CallOptions).ListJobs):len((*c.CallOptions).ListJobs)], opts...) + it := &JobIterator{} + req = proto.Clone(req).(*batchpb.ListJobsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*batchpb.Job, string, error) { + resp := &batchpb.ListJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListJobs(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetJobs(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetTask(ctx context.Context, req *batchpb.GetTaskRequest, opts ...gax.CallOption) (*batchpb.Task, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetTask[0:len((*c.CallOptions).GetTask):len((*c.CallOptions).GetTask)], opts...) + var resp *batchpb.Task + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetTask(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListTasks(ctx context.Context, req *batchpb.ListTasksRequest, opts ...gax.CallOption) *TaskIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListTasks[0:len((*c.CallOptions).ListTasks):len((*c.CallOptions).ListTasks)], opts...) + it := &TaskIterator{} + req = proto.Clone(req).(*batchpb.ListTasksRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*batchpb.Task, string, error) { + resp := &batchpb.ListTasksResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListTasks(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTasks(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateJob create a Job. +func (c *restClient) CreateJob(ctx context.Context, req *batchpb.CreateJobRequest, opts ...gax.CallOption) (*batchpb.Job, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/jobs", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetJobId() != "" { + params.Add("jobId", fmt.Sprintf("%v", req.GetJobId())) + } + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).CreateJob[0:len((*c.CallOptions).CreateJob):len((*c.CallOptions).CreateJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &batchpb.Job{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetJob get a Job specified by its resource name. +func (c *restClient) GetJob(ctx context.Context, req *batchpb.GetJobRequest, opts ...gax.CallOption) (*batchpb.Job, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetJob[0:len((*c.CallOptions).GetJob):len((*c.CallOptions).GetJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &batchpb.Job{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteJob delete a Job. +func (c *restClient) DeleteJob(ctx context.Context, req *batchpb.DeleteJobRequest, opts ...gax.CallOption) (*DeleteJobOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetReason() != "" { + params.Add("reason", fmt.Sprintf("%v", req.GetReason())) + } + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1/%s", resp.GetName()) + return &DeleteJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListJobs list all Jobs for a project within a region. +func (c *restClient) ListJobs(ctx context.Context, req *batchpb.ListJobsRequest, opts ...gax.CallOption) *JobIterator { + it := &JobIterator{} + req = proto.Clone(req).(*batchpb.ListJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*batchpb.Job, string, error) { + resp := &batchpb.ListJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/jobs", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetTask return a single Task. +func (c *restClient) GetTask(ctx context.Context, req *batchpb.GetTaskRequest, opts ...gax.CallOption) (*batchpb.Task, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetTask[0:len((*c.CallOptions).GetTask):len((*c.CallOptions).GetTask)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &batchpb.Task{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListTasks list Tasks associated with a job. +func (c *restClient) ListTasks(ctx context.Context, req *batchpb.ListTasksRequest, opts ...gax.CallOption) *TaskIterator { + it := &TaskIterator{} + req = proto.Clone(req).(*batchpb.ListTasksRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*batchpb.Task, string, error) { + resp := &batchpb.ListTasksResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/tasks", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTasks(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:cancel", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/operations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteJobOperation returns a new DeleteJobOperation from a given name. +// The name must be that of a previously created DeleteJobOperation, possibly from a different process. +func (c *gRPCClient) DeleteJobOperation(name string) *DeleteJobOperation { + return &DeleteJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteJobOperation returns a new DeleteJobOperation from a given name. +// The name must be that of a previously created DeleteJobOperation, possibly from a different process. +func (c *restClient) DeleteJobOperation(name string) *DeleteJobOperation { + override := fmt.Sprintf("/v1/%s", name) + return &DeleteJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/batchpb/batch.pb.go b/vendor/cloud.google.com/go/batch/apiv1/batchpb/batch.pb.go new file mode 100644 index 000000000..2d15f6595 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/batchpb/batch.pb.go @@ -0,0 +1,1382 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: google/cloud/batch/v1/batch.proto + +package batchpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// CreateJob Request. +type CreateJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent resource name where the Job will be created. + // Pattern: "projects/{project}/locations/{location}" + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // ID used to uniquely identify the Job within its parent scope. + // This field should contain at most 63 characters and must start with + // lowercase characters. + // Only lowercase characters, numbers and '-' are accepted. + // The '-' character cannot be the first or the last one. + // A system generated ID will be used if the field is not set. + // + // The job.name field in the request will be ignored and the created resource + // name of the Job will be "{parent}/jobs/{job_id}". + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // Required. The Job to create. + Job *Job `protobuf:"bytes,3,opt,name=job,proto3" json:"job,omitempty"` + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreateJobRequest) Reset() { + *x = CreateJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateJobRequest) ProtoMessage() {} + +func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateJobRequest.ProtoReflect.Descriptor instead. +func (*CreateJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateJobRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateJobRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *CreateJobRequest) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +func (x *CreateJobRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// GetJob Request. +type GetJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Job name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetJobRequest) Reset() { + *x = GetJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobRequest) ProtoMessage() {} + +func (x *GetJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead. +func (*GetJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{1} +} + +func (x *GetJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// DeleteJob Request. +type DeleteJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Job name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Reason for this deletion. + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteJobRequest) Reset() { + *x = DeleteJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteJobRequest) ProtoMessage() {} + +func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteJobRequest.ProtoReflect.Descriptor instead. +func (*DeleteJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{2} +} + +func (x *DeleteJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteJobRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *DeleteJobRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// ListJob Request. +type ListJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Parent path. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // List filter. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Sort results. Supported are "name", "name desc", "create_time", + // and "create_time desc". + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + // Page size. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListJobsRequest) Reset() { + *x = ListJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsRequest) ProtoMessage() {} + +func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead. +func (*ListJobsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{3} +} + +func (x *ListJobsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListJobsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListJobsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListJobsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListJobsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// ListJob Response. +type ListJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Jobs. + Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` + // Next page token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListJobsResponse) Reset() { + *x = ListJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsResponse) ProtoMessage() {} + +func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead. +func (*ListJobsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{4} +} + +func (x *ListJobsResponse) GetJobs() []*Job { + if x != nil { + return x.Jobs + } + return nil +} + +func (x *ListJobsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListJobsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// ListTasks Request. +type ListTasksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of a TaskGroup from which Tasks are being requested. + // Pattern: + // "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}" + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Task filter, null filter matches all Tasks. + // Filter string should be of the format State=TaskStatus.State e.g. + // State=RUNNING + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Page size. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTasksRequest) Reset() { + *x = ListTasksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksRequest) ProtoMessage() {} + +func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksRequest.ProtoReflect.Descriptor instead. +func (*ListTasksRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{5} +} + +func (x *ListTasksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTasksRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListTasksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTasksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// ListTasks Response. +type ListTasksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Tasks. + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + // Next page token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListTasksResponse) Reset() { + *x = ListTasksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTasksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksResponse) ProtoMessage() {} + +func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksResponse.ProtoReflect.Descriptor instead. +func (*ListTasksResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{6} +} + +func (x *ListTasksResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +func (x *ListTasksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListTasksResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// Request for a single Task by name. +type GetTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Task name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetTaskRequest) Reset() { + *x = GetTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTaskRequest) ProtoMessage() {} + +func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead. +func (*GetTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{7} +} + +func (x *GetTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Represents the metadata of the long-running operation. +type OperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The time the operation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The time the operation finished running. + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Output only. Server-defined resource path for the target of the operation. + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + // Output only. Name of the verb executed by the operation. + Verb string `protobuf:"bytes,4,opt,name=verb,proto3" json:"verb,omitempty"` + // Output only. Human-readable status of the operation, if any. + StatusMessage string `protobuf:"bytes,5,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + RequestedCancellation bool `protobuf:"varint,6,opt,name=requested_cancellation,json=requestedCancellation,proto3" json:"requested_cancellation,omitempty"` + // Output only. API version used to start the operation. + ApiVersion string `protobuf:"bytes,7,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` +} + +func (x *OperationMetadata) Reset() { + *x = OperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationMetadata) ProtoMessage() {} + +func (x *OperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead. +func (*OperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_batch_proto_rawDescGZIP(), []int{8} +} + +func (x *OperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *OperationMetadata) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *OperationMetadata) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *OperationMetadata) GetVerb() string { + if x != nil { + return x.Verb + } + return "" +} + +func (x *OperationMetadata) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" +} + +func (x *OperationMetadata) GetRequestedCancellation() bool { + if x != nil { + return x.RequestedCancellation + } + return false +} + +func (x *OperationMetadata) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +var File_google_cloud_batch_v1_batch_proto protoreflect.FileDescriptor + +var file_google_cloud_batch_v1_batch_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, + 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xba, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1a, 0x12, 0x18, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4a, 0x6f, 0x62, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x45, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x1a, 0x0a, 0x18, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4a, 0x6f, 0x62, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x9d, 0x01, + 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, + 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8c, 0x01, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, + 0x62, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, + 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xa6, 0x01, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x54, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, + 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, + 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x47, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1b, + 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x2a, 0x0a, 0x0e, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x61, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xb6, 0x08, 0x0a, 0x0c, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x09, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x22, 0x49, 0xda, + 0x41, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x6a, 0x6f, 0x62, 0x2c, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x28, + 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x06, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x22, 0x37, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xcf, + 0x01, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x27, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0xca, 0x41, 0x40, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x2a, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, + 0x12, 0x96, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, + 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, + 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x4c, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, + 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6a, 0x6f, + 0x62, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x48, 0xca, 0x41, 0x14, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x42, 0xab, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x70, 0x62, 0x3b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x70, 0x62, 0xa2, + 0x02, 0x03, 0x47, 0x43, 0x42, 0xaa, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x18, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_batch_v1_batch_proto_rawDescOnce sync.Once + file_google_cloud_batch_v1_batch_proto_rawDescData = file_google_cloud_batch_v1_batch_proto_rawDesc +) + +func file_google_cloud_batch_v1_batch_proto_rawDescGZIP() []byte { + file_google_cloud_batch_v1_batch_proto_rawDescOnce.Do(func() { + file_google_cloud_batch_v1_batch_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_batch_v1_batch_proto_rawDescData) + }) + return file_google_cloud_batch_v1_batch_proto_rawDescData +} + +var file_google_cloud_batch_v1_batch_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_batch_v1_batch_proto_goTypes = []interface{}{ + (*CreateJobRequest)(nil), // 0: google.cloud.batch.v1.CreateJobRequest + (*GetJobRequest)(nil), // 1: google.cloud.batch.v1.GetJobRequest + (*DeleteJobRequest)(nil), // 2: google.cloud.batch.v1.DeleteJobRequest + (*ListJobsRequest)(nil), // 3: google.cloud.batch.v1.ListJobsRequest + (*ListJobsResponse)(nil), // 4: google.cloud.batch.v1.ListJobsResponse + (*ListTasksRequest)(nil), // 5: google.cloud.batch.v1.ListTasksRequest + (*ListTasksResponse)(nil), // 6: google.cloud.batch.v1.ListTasksResponse + (*GetTaskRequest)(nil), // 7: google.cloud.batch.v1.GetTaskRequest + (*OperationMetadata)(nil), // 8: google.cloud.batch.v1.OperationMetadata + (*Job)(nil), // 9: google.cloud.batch.v1.Job + (*Task)(nil), // 10: google.cloud.batch.v1.Task + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*longrunningpb.Operation)(nil), // 12: google.longrunning.Operation +} +var file_google_cloud_batch_v1_batch_proto_depIdxs = []int32{ + 9, // 0: google.cloud.batch.v1.CreateJobRequest.job:type_name -> google.cloud.batch.v1.Job + 9, // 1: google.cloud.batch.v1.ListJobsResponse.jobs:type_name -> google.cloud.batch.v1.Job + 10, // 2: google.cloud.batch.v1.ListTasksResponse.tasks:type_name -> google.cloud.batch.v1.Task + 11, // 3: google.cloud.batch.v1.OperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 11, // 4: google.cloud.batch.v1.OperationMetadata.end_time:type_name -> google.protobuf.Timestamp + 0, // 5: google.cloud.batch.v1.BatchService.CreateJob:input_type -> google.cloud.batch.v1.CreateJobRequest + 1, // 6: google.cloud.batch.v1.BatchService.GetJob:input_type -> google.cloud.batch.v1.GetJobRequest + 2, // 7: google.cloud.batch.v1.BatchService.DeleteJob:input_type -> google.cloud.batch.v1.DeleteJobRequest + 3, // 8: google.cloud.batch.v1.BatchService.ListJobs:input_type -> google.cloud.batch.v1.ListJobsRequest + 7, // 9: google.cloud.batch.v1.BatchService.GetTask:input_type -> google.cloud.batch.v1.GetTaskRequest + 5, // 10: google.cloud.batch.v1.BatchService.ListTasks:input_type -> google.cloud.batch.v1.ListTasksRequest + 9, // 11: google.cloud.batch.v1.BatchService.CreateJob:output_type -> google.cloud.batch.v1.Job + 9, // 12: google.cloud.batch.v1.BatchService.GetJob:output_type -> google.cloud.batch.v1.Job + 12, // 13: google.cloud.batch.v1.BatchService.DeleteJob:output_type -> google.longrunning.Operation + 4, // 14: google.cloud.batch.v1.BatchService.ListJobs:output_type -> google.cloud.batch.v1.ListJobsResponse + 10, // 15: google.cloud.batch.v1.BatchService.GetTask:output_type -> google.cloud.batch.v1.Task + 6, // 16: google.cloud.batch.v1.BatchService.ListTasks:output_type -> google.cloud.batch.v1.ListTasksResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_batch_v1_batch_proto_init() } +func file_google_cloud_batch_v1_batch_proto_init() { + if File_google_cloud_batch_v1_batch_proto != nil { + return + } + file_google_cloud_batch_v1_job_proto_init() + file_google_cloud_batch_v1_task_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_batch_v1_batch_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_batch_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_batch_v1_batch_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_batch_v1_batch_proto_goTypes, + DependencyIndexes: file_google_cloud_batch_v1_batch_proto_depIdxs, + MessageInfos: file_google_cloud_batch_v1_batch_proto_msgTypes, + }.Build() + File_google_cloud_batch_v1_batch_proto = out.File + file_google_cloud_batch_v1_batch_proto_rawDesc = nil + file_google_cloud_batch_v1_batch_proto_goTypes = nil + file_google_cloud_batch_v1_batch_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// BatchServiceClient is the client API for BatchService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BatchServiceClient interface { + // Create a Job. + CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) + // Get a Job specified by its resource name. + GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) + // Delete a Job. + DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // List all Jobs for a project within a region. + ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) + // Return a single Task. + GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) + // List Tasks associated with a job. + ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) +} + +type batchServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBatchServiceClient(cc grpc.ClientConnInterface) BatchServiceClient { + return &batchServiceClient{cc} +} + +func (c *batchServiceClient) CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) { + out := new(Job) + err := c.cc.Invoke(ctx, "/google.cloud.batch.v1.BatchService/CreateJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *batchServiceClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) { + out := new(Job) + err := c.cc.Invoke(ctx, "/google.cloud.batch.v1.BatchService/GetJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *batchServiceClient) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.batch.v1.BatchService/DeleteJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *batchServiceClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { + out := new(ListJobsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.batch.v1.BatchService/ListJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *batchServiceClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.batch.v1.BatchService/GetTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *batchServiceClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + out := new(ListTasksResponse) + err := c.cc.Invoke(ctx, "/google.cloud.batch.v1.BatchService/ListTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BatchServiceServer is the server API for BatchService service. +type BatchServiceServer interface { + // Create a Job. + CreateJob(context.Context, *CreateJobRequest) (*Job, error) + // Get a Job specified by its resource name. + GetJob(context.Context, *GetJobRequest) (*Job, error) + // Delete a Job. + DeleteJob(context.Context, *DeleteJobRequest) (*longrunningpb.Operation, error) + // List all Jobs for a project within a region. + ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) + // Return a single Task. + GetTask(context.Context, *GetTaskRequest) (*Task, error) + // List Tasks associated with a job. + ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) +} + +// UnimplementedBatchServiceServer can be embedded to have forward compatible implementations. +type UnimplementedBatchServiceServer struct { +} + +func (*UnimplementedBatchServiceServer) CreateJob(context.Context, *CreateJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateJob not implemented") +} +func (*UnimplementedBatchServiceServer) GetJob(context.Context, *GetJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented") +} +func (*UnimplementedBatchServiceServer) DeleteJob(context.Context, *DeleteJobRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteJob not implemented") +} +func (*UnimplementedBatchServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") +} +func (*UnimplementedBatchServiceServer) GetTask(context.Context, *GetTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented") +} +func (*UnimplementedBatchServiceServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTasks not implemented") +} + +func RegisterBatchServiceServer(s *grpc.Server, srv BatchServiceServer) { + s.RegisterService(&_BatchService_serviceDesc, srv) +} + +func _BatchService_CreateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BatchServiceServer).CreateJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.batch.v1.BatchService/CreateJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BatchServiceServer).CreateJob(ctx, req.(*CreateJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BatchService_GetJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BatchServiceServer).GetJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.batch.v1.BatchService/GetJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BatchServiceServer).GetJob(ctx, req.(*GetJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BatchService_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BatchServiceServer).DeleteJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.batch.v1.BatchService/DeleteJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BatchServiceServer).DeleteJob(ctx, req.(*DeleteJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BatchService_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BatchServiceServer).ListJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.batch.v1.BatchService/ListJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BatchServiceServer).ListJobs(ctx, req.(*ListJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BatchService_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BatchServiceServer).GetTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.batch.v1.BatchService/GetTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BatchServiceServer).GetTask(ctx, req.(*GetTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BatchService_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BatchServiceServer).ListTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.batch.v1.BatchService/ListTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BatchServiceServer).ListTasks(ctx, req.(*ListTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _BatchService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.batch.v1.BatchService", + HandlerType: (*BatchServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateJob", + Handler: _BatchService_CreateJob_Handler, + }, + { + MethodName: "GetJob", + Handler: _BatchService_GetJob_Handler, + }, + { + MethodName: "DeleteJob", + Handler: _BatchService_DeleteJob_Handler, + }, + { + MethodName: "ListJobs", + Handler: _BatchService_ListJobs_Handler, + }, + { + MethodName: "GetTask", + Handler: _BatchService_GetTask_Handler, + }, + { + MethodName: "ListTasks", + Handler: _BatchService_ListTasks_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/batch/v1/batch.proto", +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/batchpb/job.pb.go b/vendor/cloud.google.com/go/batch/apiv1/batchpb/job.pb.go new file mode 100644 index 000000000..5e8261986 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/batchpb/job.pb.go @@ -0,0 +1,2898 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: google/cloud/batch/v1/job.proto + +package batchpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The destination (if any) for logs. +type LogsPolicy_Destination int32 + +const ( + // Logs are not preserved. + LogsPolicy_DESTINATION_UNSPECIFIED LogsPolicy_Destination = 0 + // Logs are streamed to Cloud Logging. + LogsPolicy_CLOUD_LOGGING LogsPolicy_Destination = 1 + // Logs are saved to a file path. + LogsPolicy_PATH LogsPolicy_Destination = 2 +) + +// Enum value maps for LogsPolicy_Destination. +var ( + LogsPolicy_Destination_name = map[int32]string{ + 0: "DESTINATION_UNSPECIFIED", + 1: "CLOUD_LOGGING", + 2: "PATH", + } + LogsPolicy_Destination_value = map[string]int32{ + "DESTINATION_UNSPECIFIED": 0, + "CLOUD_LOGGING": 1, + "PATH": 2, + } +) + +func (x LogsPolicy_Destination) Enum() *LogsPolicy_Destination { + p := new(LogsPolicy_Destination) + *p = x + return p +} + +func (x LogsPolicy_Destination) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LogsPolicy_Destination) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_batch_v1_job_proto_enumTypes[0].Descriptor() +} + +func (LogsPolicy_Destination) Type() protoreflect.EnumType { + return &file_google_cloud_batch_v1_job_proto_enumTypes[0] +} + +func (x LogsPolicy_Destination) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LogsPolicy_Destination.Descriptor instead. +func (LogsPolicy_Destination) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{1, 0} +} + +// Valid Job states. +type JobStatus_State int32 + +const ( + // Job state unspecified. + JobStatus_STATE_UNSPECIFIED JobStatus_State = 0 + // Job is admitted (validated and persisted) and waiting for resources. + JobStatus_QUEUED JobStatus_State = 1 + // Job is scheduled to run as soon as resource allocation is ready. + // The resource allocation may happen at a later time but with a high + // chance to succeed. + JobStatus_SCHEDULED JobStatus_State = 2 + // Resource allocation has been successful. At least one Task in the Job is + // RUNNING. + JobStatus_RUNNING JobStatus_State = 3 + // All Tasks in the Job have finished successfully. + JobStatus_SUCCEEDED JobStatus_State = 4 + // At least one Task in the Job has failed. + JobStatus_FAILED JobStatus_State = 5 + // The Job will be deleted, but has not been deleted yet. Typically this is + // because resources used by the Job are still being cleaned up. + JobStatus_DELETION_IN_PROGRESS JobStatus_State = 6 +) + +// Enum value maps for JobStatus_State. +var ( + JobStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "QUEUED", + 2: "SCHEDULED", + 3: "RUNNING", + 4: "SUCCEEDED", + 5: "FAILED", + 6: "DELETION_IN_PROGRESS", + } + JobStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "QUEUED": 1, + "SCHEDULED": 2, + "RUNNING": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "DELETION_IN_PROGRESS": 6, + } +) + +func (x JobStatus_State) Enum() *JobStatus_State { + p := new(JobStatus_State) + *p = x + return p +} + +func (x JobStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_batch_v1_job_proto_enumTypes[1].Descriptor() +} + +func (JobStatus_State) Type() protoreflect.EnumType { + return &file_google_cloud_batch_v1_job_proto_enumTypes[1] +} + +func (x JobStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobStatus_State.Descriptor instead. +func (JobStatus_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{2, 0} +} + +// The message type. +type JobNotification_Type int32 + +const ( + // Unspecified. + JobNotification_TYPE_UNSPECIFIED JobNotification_Type = 0 + // Notify users that the job state has changed. + JobNotification_JOB_STATE_CHANGED JobNotification_Type = 1 + // Notify users that the task state has changed. + JobNotification_TASK_STATE_CHANGED JobNotification_Type = 2 +) + +// Enum value maps for JobNotification_Type. +var ( + JobNotification_Type_name = map[int32]string{ + 0: "TYPE_UNSPECIFIED", + 1: "JOB_STATE_CHANGED", + 2: "TASK_STATE_CHANGED", + } + JobNotification_Type_value = map[string]int32{ + "TYPE_UNSPECIFIED": 0, + "JOB_STATE_CHANGED": 1, + "TASK_STATE_CHANGED": 2, + } +) + +func (x JobNotification_Type) Enum() *JobNotification_Type { + p := new(JobNotification_Type) + *p = x + return p +} + +func (x JobNotification_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobNotification_Type) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_batch_v1_job_proto_enumTypes[2].Descriptor() +} + +func (JobNotification_Type) Type() protoreflect.EnumType { + return &file_google_cloud_batch_v1_job_proto_enumTypes[2] +} + +func (x JobNotification_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobNotification_Type.Descriptor instead. +func (JobNotification_Type) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{3, 0} +} + +// Compute Engine VM instance provisioning model. +type AllocationPolicy_ProvisioningModel int32 + +const ( + // Unspecified. + AllocationPolicy_PROVISIONING_MODEL_UNSPECIFIED AllocationPolicy_ProvisioningModel = 0 + // Standard VM. + AllocationPolicy_STANDARD AllocationPolicy_ProvisioningModel = 1 + // SPOT VM. + AllocationPolicy_SPOT AllocationPolicy_ProvisioningModel = 2 + // Preemptible VM (PVM). + // + // Above SPOT VM is the preferable model for preemptible VM instances: the + // old preemptible VM model (indicated by this field) is the older model, + // and has been migrated to use the SPOT model as the underlying technology. + // This old model will still be supported. + AllocationPolicy_PREEMPTIBLE AllocationPolicy_ProvisioningModel = 3 +) + +// Enum value maps for AllocationPolicy_ProvisioningModel. +var ( + AllocationPolicy_ProvisioningModel_name = map[int32]string{ + 0: "PROVISIONING_MODEL_UNSPECIFIED", + 1: "STANDARD", + 2: "SPOT", + 3: "PREEMPTIBLE", + } + AllocationPolicy_ProvisioningModel_value = map[string]int32{ + "PROVISIONING_MODEL_UNSPECIFIED": 0, + "STANDARD": 1, + "SPOT": 2, + "PREEMPTIBLE": 3, + } +) + +func (x AllocationPolicy_ProvisioningModel) Enum() *AllocationPolicy_ProvisioningModel { + p := new(AllocationPolicy_ProvisioningModel) + *p = x + return p +} + +func (x AllocationPolicy_ProvisioningModel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AllocationPolicy_ProvisioningModel) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_batch_v1_job_proto_enumTypes[3].Descriptor() +} + +func (AllocationPolicy_ProvisioningModel) Type() protoreflect.EnumType { + return &file_google_cloud_batch_v1_job_proto_enumTypes[3] +} + +func (x AllocationPolicy_ProvisioningModel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AllocationPolicy_ProvisioningModel.Descriptor instead. +func (AllocationPolicy_ProvisioningModel) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 0} +} + +// How Tasks in the TaskGroup should be scheduled relative to each other. +type TaskGroup_SchedulingPolicy int32 + +const ( + // Unspecified. + TaskGroup_SCHEDULING_POLICY_UNSPECIFIED TaskGroup_SchedulingPolicy = 0 + // Run Tasks as soon as resources are available. + // + // Tasks might be executed in parallel depending on parallelism and + // task_count values. + TaskGroup_AS_SOON_AS_POSSIBLE TaskGroup_SchedulingPolicy = 1 + // Run Tasks sequentially with increased task index. + TaskGroup_IN_ORDER TaskGroup_SchedulingPolicy = 2 +) + +// Enum value maps for TaskGroup_SchedulingPolicy. +var ( + TaskGroup_SchedulingPolicy_name = map[int32]string{ + 0: "SCHEDULING_POLICY_UNSPECIFIED", + 1: "AS_SOON_AS_POSSIBLE", + 2: "IN_ORDER", + } + TaskGroup_SchedulingPolicy_value = map[string]int32{ + "SCHEDULING_POLICY_UNSPECIFIED": 0, + "AS_SOON_AS_POSSIBLE": 1, + "IN_ORDER": 2, + } +) + +func (x TaskGroup_SchedulingPolicy) Enum() *TaskGroup_SchedulingPolicy { + p := new(TaskGroup_SchedulingPolicy) + *p = x + return p +} + +func (x TaskGroup_SchedulingPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskGroup_SchedulingPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_batch_v1_job_proto_enumTypes[4].Descriptor() +} + +func (TaskGroup_SchedulingPolicy) Type() protoreflect.EnumType { + return &file_google_cloud_batch_v1_job_proto_enumTypes[4] +} + +func (x TaskGroup_SchedulingPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskGroup_SchedulingPolicy.Descriptor instead. +func (TaskGroup_SchedulingPolicy) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{5, 0} +} + +// The Cloud Batch Job description. +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Job name. + // For example: "projects/123456/locations/us-central1/jobs/job01". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. A system generated unique ID for the Job. + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + // Priority of the Job. + // The valid value range is [0, 100). Default value is 0. + // Higher value indicates higher priority. + // A job with higher priority value is more likely to run earlier if all other + // requirements are satisfied. + Priority int64 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` + // Required. TaskGroups in the Job. Only one TaskGroup is supported now. + TaskGroups []*TaskGroup `protobuf:"bytes,4,rep,name=task_groups,json=taskGroups,proto3" json:"task_groups,omitempty"` + // Compute resource allocation for all TaskGroups in the Job. + AllocationPolicy *AllocationPolicy `protobuf:"bytes,7,opt,name=allocation_policy,json=allocationPolicy,proto3" json:"allocation_policy,omitempty"` + // Labels for the Job. Labels could be user provided or system generated. + // For example, + // + // "labels": { + // "department": "finance", + // "environment": "test" + // } + // + // You can assign up to 64 labels. [Google Compute Engine label + // restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + // apply. + // Label names that start with "goog-" or "google-" are reserved. + Labels map[string]string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Output only. Job status. It is read only for users. + Status *JobStatus `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` + // Output only. When the Job was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The last time the Job was updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Log preservation policy for the Job. + LogsPolicy *LogsPolicy `protobuf:"bytes,13,opt,name=logs_policy,json=logsPolicy,proto3" json:"logs_policy,omitempty"` + // Notification configurations. + Notifications []*JobNotification `protobuf:"bytes,14,rep,name=notifications,proto3" json:"notifications,omitempty"` +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{0} +} + +func (x *Job) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Job) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *Job) GetPriority() int64 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *Job) GetTaskGroups() []*TaskGroup { + if x != nil { + return x.TaskGroups + } + return nil +} + +func (x *Job) GetAllocationPolicy() *AllocationPolicy { + if x != nil { + return x.AllocationPolicy + } + return nil +} + +func (x *Job) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Job) GetStatus() *JobStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *Job) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Job) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Job) GetLogsPolicy() *LogsPolicy { + if x != nil { + return x.LogsPolicy + } + return nil +} + +func (x *Job) GetNotifications() []*JobNotification { + if x != nil { + return x.Notifications + } + return nil +} + +// LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be +// preserved. +type LogsPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Where logs should be saved. + Destination LogsPolicy_Destination `protobuf:"varint,1,opt,name=destination,proto3,enum=google.cloud.batch.v1.LogsPolicy_Destination" json:"destination,omitempty"` + // The path to which logs are saved when the destination = PATH. This can be a + // local file path on the VM, or under the mount point of a Persistent Disk or + // Filestore, or a Cloud Storage path. + LogsPath string `protobuf:"bytes,2,opt,name=logs_path,json=logsPath,proto3" json:"logs_path,omitempty"` + // Optional. Additional settings for Cloud Logging. It will only take effect + // when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + CloudLoggingOption *LogsPolicy_CloudLoggingOption `protobuf:"bytes,3,opt,name=cloud_logging_option,json=cloudLoggingOption,proto3" json:"cloud_logging_option,omitempty"` +} + +func (x *LogsPolicy) Reset() { + *x = LogsPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogsPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogsPolicy) ProtoMessage() {} + +func (x *LogsPolicy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogsPolicy.ProtoReflect.Descriptor instead. +func (*LogsPolicy) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{1} +} + +func (x *LogsPolicy) GetDestination() LogsPolicy_Destination { + if x != nil { + return x.Destination + } + return LogsPolicy_DESTINATION_UNSPECIFIED +} + +func (x *LogsPolicy) GetLogsPath() string { + if x != nil { + return x.LogsPath + } + return "" +} + +func (x *LogsPolicy) GetCloudLoggingOption() *LogsPolicy_CloudLoggingOption { + if x != nil { + return x.CloudLoggingOption + } + return nil +} + +// Job status. +type JobStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Job state + State JobStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.batch.v1.JobStatus_State" json:"state,omitempty"` + // Job status events + StatusEvents []*StatusEvent `protobuf:"bytes,2,rep,name=status_events,json=statusEvents,proto3" json:"status_events,omitempty"` + // Aggregated task status for each TaskGroup in the Job. + // The map key is TaskGroup ID. + TaskGroups map[string]*JobStatus_TaskGroupStatus `protobuf:"bytes,4,rep,name=task_groups,json=taskGroups,proto3" json:"task_groups,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The duration of time that the Job spent in status RUNNING. + RunDuration *durationpb.Duration `protobuf:"bytes,5,opt,name=run_duration,json=runDuration,proto3" json:"run_duration,omitempty"` +} + +func (x *JobStatus) Reset() { + *x = JobStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobStatus) ProtoMessage() {} + +func (x *JobStatus) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobStatus.ProtoReflect.Descriptor instead. +func (*JobStatus) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{2} +} + +func (x *JobStatus) GetState() JobStatus_State { + if x != nil { + return x.State + } + return JobStatus_STATE_UNSPECIFIED +} + +func (x *JobStatus) GetStatusEvents() []*StatusEvent { + if x != nil { + return x.StatusEvents + } + return nil +} + +func (x *JobStatus) GetTaskGroups() map[string]*JobStatus_TaskGroupStatus { + if x != nil { + return x.TaskGroups + } + return nil +} + +func (x *JobStatus) GetRunDuration() *durationpb.Duration { + if x != nil { + return x.RunDuration + } + return nil +} + +// Notification configurations. +type JobNotification struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Pub/Sub topic where notifications like the job state changes + // will be published. The topic must exist in the same project as + // the job and billings will be charged to this project. + // If not specified, no Pub/Sub messages will be sent. + // Topic format: `projects/{project}/topics/{topic}`. + PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3" json:"pubsub_topic,omitempty"` + // The attribute requirements of messages to be sent to this Pub/Sub topic. + // Without this field, no message will be sent. + Message *JobNotification_Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *JobNotification) Reset() { + *x = JobNotification{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobNotification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobNotification) ProtoMessage() {} + +func (x *JobNotification) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobNotification.ProtoReflect.Descriptor instead. +func (*JobNotification) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{3} +} + +func (x *JobNotification) GetPubsubTopic() string { + if x != nil { + return x.PubsubTopic + } + return "" +} + +func (x *JobNotification) GetMessage() *JobNotification_Message { + if x != nil { + return x.Message + } + return nil +} + +// A Job's resource allocation policy describes when, where, and how compute +// resources should be allocated for the Job. +type AllocationPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Location where compute resources should be allocated for the Job. + Location *AllocationPolicy_LocationPolicy `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` + // Describe instances that can be created by this AllocationPolicy. + // Only instances[0] is supported now. + Instances []*AllocationPolicy_InstancePolicyOrTemplate `protobuf:"bytes,8,rep,name=instances,proto3" json:"instances,omitempty"` + // Service account that VMs will run as. + ServiceAccount *ServiceAccount `protobuf:"bytes,9,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` + // Labels applied to all VM instances and other resources + // created by AllocationPolicy. + // Labels could be user provided or system generated. + // You can assign up to 64 labels. [Google Compute Engine label + // restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + // apply. + // Label names that start with "goog-" or "google-" are reserved. + Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The network policy. + // + // If you define an instance template in the `InstancePolicyOrTemplate` field, + // Batch will use the network settings in the instance template instead of + // this field. + Network *AllocationPolicy_NetworkPolicy `protobuf:"bytes,7,opt,name=network,proto3" json:"network,omitempty"` + // The placement policy. + Placement *AllocationPolicy_PlacementPolicy `protobuf:"bytes,10,opt,name=placement,proto3" json:"placement,omitempty"` + // Optional. Tags applied to the VM instances. + // + // The tags identify valid sources or targets for network firewalls. + // Each tag must be 1-63 characters long, and comply with + // [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + Tags []string `protobuf:"bytes,11,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (x *AllocationPolicy) Reset() { + *x = AllocationPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy) ProtoMessage() {} + +func (x *AllocationPolicy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy.ProtoReflect.Descriptor instead. +func (*AllocationPolicy) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4} +} + +func (x *AllocationPolicy) GetLocation() *AllocationPolicy_LocationPolicy { + if x != nil { + return x.Location + } + return nil +} + +func (x *AllocationPolicy) GetInstances() []*AllocationPolicy_InstancePolicyOrTemplate { + if x != nil { + return x.Instances + } + return nil +} + +func (x *AllocationPolicy) GetServiceAccount() *ServiceAccount { + if x != nil { + return x.ServiceAccount + } + return nil +} + +func (x *AllocationPolicy) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *AllocationPolicy) GetNetwork() *AllocationPolicy_NetworkPolicy { + if x != nil { + return x.Network + } + return nil +} + +func (x *AllocationPolicy) GetPlacement() *AllocationPolicy_PlacementPolicy { + if x != nil { + return x.Placement + } + return nil +} + +func (x *AllocationPolicy) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +// A TaskGroup defines one or more Tasks that all share the same TaskSpec. +type TaskGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. TaskGroup name. + // The system generates this field based on parent Job name. + // For example: + // "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Tasks in the group share the same task spec. + TaskSpec *TaskSpec `protobuf:"bytes,3,opt,name=task_spec,json=taskSpec,proto3" json:"task_spec,omitempty"` + // Number of Tasks in the TaskGroup. + // Default is 1. + TaskCount int64 `protobuf:"varint,4,opt,name=task_count,json=taskCount,proto3" json:"task_count,omitempty"` + // Max number of tasks that can run in parallel. + // Default to min(task_count, parallel tasks per job limit). + // See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). + // Field parallelism must be 1 if the scheduling_policy is IN_ORDER. + Parallelism int64 `protobuf:"varint,5,opt,name=parallelism,proto3" json:"parallelism,omitempty"` + // Scheduling policy for Tasks in the TaskGroup. + // The default value is AS_SOON_AS_POSSIBLE. + SchedulingPolicy TaskGroup_SchedulingPolicy `protobuf:"varint,6,opt,name=scheduling_policy,json=schedulingPolicy,proto3,enum=google.cloud.batch.v1.TaskGroup_SchedulingPolicy" json:"scheduling_policy,omitempty"` + // An array of environment variable mappings, which are passed to Tasks with + // matching indices. If task_environments is used then task_count should + // not be specified in the request (and will be ignored). Task count will be + // the length of task_environments. + // + // Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in + // addition to any environment variables set in task_environments, specifying + // the number of Tasks in the Task's parent TaskGroup, and the specific Task's + // index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). + TaskEnvironments []*Environment `protobuf:"bytes,9,rep,name=task_environments,json=taskEnvironments,proto3" json:"task_environments,omitempty"` + // Max number of tasks that can be run on a VM at the same time. + // If not specified, the system will decide a value based on available + // compute resources on a VM and task requirements. + TaskCountPerNode int64 `protobuf:"varint,10,opt,name=task_count_per_node,json=taskCountPerNode,proto3" json:"task_count_per_node,omitempty"` + // When true, Batch will populate a file with a list of all VMs assigned to + // the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path + // of that file. Defaults to false. The host file supports up to 1000 VMs. + RequireHostsFile bool `protobuf:"varint,11,opt,name=require_hosts_file,json=requireHostsFile,proto3" json:"require_hosts_file,omitempty"` + // When true, Batch will configure SSH to allow passwordless login between + // VMs running the Batch tasks in the same TaskGroup. + PermissiveSsh bool `protobuf:"varint,12,opt,name=permissive_ssh,json=permissiveSsh,proto3" json:"permissive_ssh,omitempty"` + // Optional. If not set or set to false, Batch uses the root user to execute + // runnables. If set to true, Batch runs the runnables using a non-root user. + // Currently, the non-root user Batch used is generated by OS Login. For more + // information, see [About OS + // Login](https://cloud.google.com/compute/docs/oslogin). + RunAsNonRoot bool `protobuf:"varint,14,opt,name=run_as_non_root,json=runAsNonRoot,proto3" json:"run_as_non_root,omitempty"` +} + +func (x *TaskGroup) Reset() { + *x = TaskGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskGroup) ProtoMessage() {} + +func (x *TaskGroup) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskGroup.ProtoReflect.Descriptor instead. +func (*TaskGroup) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{5} +} + +func (x *TaskGroup) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TaskGroup) GetTaskSpec() *TaskSpec { + if x != nil { + return x.TaskSpec + } + return nil +} + +func (x *TaskGroup) GetTaskCount() int64 { + if x != nil { + return x.TaskCount + } + return 0 +} + +func (x *TaskGroup) GetParallelism() int64 { + if x != nil { + return x.Parallelism + } + return 0 +} + +func (x *TaskGroup) GetSchedulingPolicy() TaskGroup_SchedulingPolicy { + if x != nil { + return x.SchedulingPolicy + } + return TaskGroup_SCHEDULING_POLICY_UNSPECIFIED +} + +func (x *TaskGroup) GetTaskEnvironments() []*Environment { + if x != nil { + return x.TaskEnvironments + } + return nil +} + +func (x *TaskGroup) GetTaskCountPerNode() int64 { + if x != nil { + return x.TaskCountPerNode + } + return 0 +} + +func (x *TaskGroup) GetRequireHostsFile() bool { + if x != nil { + return x.RequireHostsFile + } + return false +} + +func (x *TaskGroup) GetPermissiveSsh() bool { + if x != nil { + return x.PermissiveSsh + } + return false +} + +func (x *TaskGroup) GetRunAsNonRoot() bool { + if x != nil { + return x.RunAsNonRoot + } + return false +} + +// Carries information about a Google Cloud service account. +type ServiceAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Email address of the service account. If not specified, the default + // Compute Engine service account for the project will be used. If instance + // template is being used, the service account has to be specified in the + // instance template and it has to match the email field here. + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + // List of scopes to be enabled for this service account on the VM, in + // addition to the cloud-platform API scope that will be added by default. + Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` +} + +func (x *ServiceAccount) Reset() { + *x = ServiceAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceAccount) ProtoMessage() {} + +func (x *ServiceAccount) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead. +func (*ServiceAccount) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{6} +} + +func (x *ServiceAccount) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ServiceAccount) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +// `CloudLoggingOption` contains additional settings for Cloud Logging logs +// generated by Batch job. +type LogsPolicy_CloudLoggingOption struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Set this flag to true to change the [monitored resource + // type](https://cloud.google.com/monitoring/api/resources) for + // Cloud Logging logs generated by this Batch job from + // the + // [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) + // type to the formerly used + // [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) + // type. + UseGenericTaskMonitoredResource bool `protobuf:"varint,1,opt,name=use_generic_task_monitored_resource,json=useGenericTaskMonitoredResource,proto3" json:"use_generic_task_monitored_resource,omitempty"` +} + +func (x *LogsPolicy_CloudLoggingOption) Reset() { + *x = LogsPolicy_CloudLoggingOption{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogsPolicy_CloudLoggingOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogsPolicy_CloudLoggingOption) ProtoMessage() {} + +func (x *LogsPolicy_CloudLoggingOption) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogsPolicy_CloudLoggingOption.ProtoReflect.Descriptor instead. +func (*LogsPolicy_CloudLoggingOption) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *LogsPolicy_CloudLoggingOption) GetUseGenericTaskMonitoredResource() bool { + if x != nil { + return x.UseGenericTaskMonitoredResource + } + return false +} + +// VM instance status. +type JobStatus_InstanceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Compute Engine machine type. + MachineType string `protobuf:"bytes,1,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + // The VM instance provisioning model. + ProvisioningModel AllocationPolicy_ProvisioningModel `protobuf:"varint,2,opt,name=provisioning_model,json=provisioningModel,proto3,enum=google.cloud.batch.v1.AllocationPolicy_ProvisioningModel" json:"provisioning_model,omitempty"` + // The max number of tasks can be assigned to this instance type. + TaskPack int64 `protobuf:"varint,3,opt,name=task_pack,json=taskPack,proto3" json:"task_pack,omitempty"` + // The VM boot disk. + BootDisk *AllocationPolicy_Disk `protobuf:"bytes,4,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` +} + +func (x *JobStatus_InstanceStatus) Reset() { + *x = JobStatus_InstanceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobStatus_InstanceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobStatus_InstanceStatus) ProtoMessage() {} + +func (x *JobStatus_InstanceStatus) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobStatus_InstanceStatus.ProtoReflect.Descriptor instead. +func (*JobStatus_InstanceStatus) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *JobStatus_InstanceStatus) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *JobStatus_InstanceStatus) GetProvisioningModel() AllocationPolicy_ProvisioningModel { + if x != nil { + return x.ProvisioningModel + } + return AllocationPolicy_PROVISIONING_MODEL_UNSPECIFIED +} + +func (x *JobStatus_InstanceStatus) GetTaskPack() int64 { + if x != nil { + return x.TaskPack + } + return 0 +} + +func (x *JobStatus_InstanceStatus) GetBootDisk() *AllocationPolicy_Disk { + if x != nil { + return x.BootDisk + } + return nil +} + +// Aggregated task status for a TaskGroup. +type JobStatus_TaskGroupStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Count of task in each state in the TaskGroup. + // The map key is task state name. + Counts map[string]int64 `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + // Status of instances allocated for the TaskGroup. + Instances []*JobStatus_InstanceStatus `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"` +} + +func (x *JobStatus_TaskGroupStatus) Reset() { + *x = JobStatus_TaskGroupStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobStatus_TaskGroupStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobStatus_TaskGroupStatus) ProtoMessage() {} + +func (x *JobStatus_TaskGroupStatus) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobStatus_TaskGroupStatus.ProtoReflect.Descriptor instead. +func (*JobStatus_TaskGroupStatus) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *JobStatus_TaskGroupStatus) GetCounts() map[string]int64 { + if x != nil { + return x.Counts + } + return nil +} + +func (x *JobStatus_TaskGroupStatus) GetInstances() []*JobStatus_InstanceStatus { + if x != nil { + return x.Instances + } + return nil +} + +// Message details. +// Describe the conditions under which messages will be sent. +// If no attribute is defined, no message will be sent by default. +// One message should specify either the job or the task level attributes, +// but not both. For example, +// job level: JOB_STATE_CHANGED and/or a specified new_job_state; +// task level: TASK_STATE_CHANGED and/or a specified new_task_state. +type JobNotification_Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The message type. + Type JobNotification_Type `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.batch.v1.JobNotification_Type" json:"type,omitempty"` + // The new job state. + NewJobState JobStatus_State `protobuf:"varint,2,opt,name=new_job_state,json=newJobState,proto3,enum=google.cloud.batch.v1.JobStatus_State" json:"new_job_state,omitempty"` + // The new task state. + NewTaskState TaskStatus_State `protobuf:"varint,3,opt,name=new_task_state,json=newTaskState,proto3,enum=google.cloud.batch.v1.TaskStatus_State" json:"new_task_state,omitempty"` +} + +func (x *JobNotification_Message) Reset() { + *x = JobNotification_Message{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobNotification_Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobNotification_Message) ProtoMessage() {} + +func (x *JobNotification_Message) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobNotification_Message.ProtoReflect.Descriptor instead. +func (*JobNotification_Message) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *JobNotification_Message) GetType() JobNotification_Type { + if x != nil { + return x.Type + } + return JobNotification_TYPE_UNSPECIFIED +} + +func (x *JobNotification_Message) GetNewJobState() JobStatus_State { + if x != nil { + return x.NewJobState + } + return JobStatus_STATE_UNSPECIFIED +} + +func (x *JobNotification_Message) GetNewTaskState() TaskStatus_State { + if x != nil { + return x.NewTaskState + } + return TaskStatus_STATE_UNSPECIFIED +} + +type AllocationPolicy_LocationPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of allowed location names represented by internal URLs. + // + // Each location can be a region or a zone. + // Only one region or multiple zones in one region is supported now. + // For example, + // ["regions/us-central1"] allow VMs in any zones in region us-central1. + // ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs + // in zones us-central1-a and us-central1-c. + // + // All locations end up in different regions would cause errors. + // For example, + // ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + // "zones/us-west1-a"] contains 2 regions "us-central1" and + // "us-west1". An error is expected in this case. + AllowedLocations []string `protobuf:"bytes,1,rep,name=allowed_locations,json=allowedLocations,proto3" json:"allowed_locations,omitempty"` +} + +func (x *AllocationPolicy_LocationPolicy) Reset() { + *x = AllocationPolicy_LocationPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_LocationPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_LocationPolicy) ProtoMessage() {} + +func (x *AllocationPolicy_LocationPolicy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_LocationPolicy.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_LocationPolicy) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *AllocationPolicy_LocationPolicy) GetAllowedLocations() []string { + if x != nil { + return x.AllowedLocations + } + return nil +} + +// A new persistent disk or a local ssd. +// A VM can only have one local SSD setting but multiple local SSD partitions. +// See https://cloud.google.com/compute/docs/disks#pdspecs and +// https://cloud.google.com/compute/docs/disks#localssds. +type AllocationPolicy_Disk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A data source from which a PD will be created. + // + // Types that are assignable to DataSource: + // + // *AllocationPolicy_Disk_Image + // *AllocationPolicy_Disk_Snapshot + DataSource isAllocationPolicy_Disk_DataSource `protobuf_oneof:"data_source"` + // Disk type as shown in `gcloud compute disk-types list`. + // For example, local SSD uses type "local-ssd". + // Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" + // or "pd-standard". + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Disk size in GB. + // + // **Non-Boot Disk**: + // If the `type` specifies a persistent disk, this field + // is ignored if `data_source` is set as `image` or `snapshot`. + // If the `type` specifies a local SSD, this field should be a multiple of + // 375 GB, otherwise, the final size will be the next greater multiple of + // 375 GB. + // + // **Boot Disk**: + // Batch will calculate the boot disk size based on source + // image and task requirements if you do not speicify the size. + // If both this field and the `boot_disk_mib` field in task spec's + // `compute_resource` are defined, Batch will only honor this field. + // Also, this field should be no smaller than the source disk's + // size when the `data_source` is set as `snapshot` or `image`. + // For example, if you set an image as the `data_source` field and the + // image's default disk size 30 GB, you can only use this field to make the + // disk larger or equal to 30 GB. + SizeGb int64 `protobuf:"varint,2,opt,name=size_gb,json=sizeGb,proto3" json:"size_gb,omitempty"` + // Local SSDs are available through both "SCSI" and "NVMe" interfaces. + // If not indicated, "NVMe" will be the default one for local ssds. + // This field is ignored for persistent disks as the interface is chosen + // automatically. See + // https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. + DiskInterface string `protobuf:"bytes,6,opt,name=disk_interface,json=diskInterface,proto3" json:"disk_interface,omitempty"` +} + +func (x *AllocationPolicy_Disk) Reset() { + *x = AllocationPolicy_Disk{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_Disk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_Disk) ProtoMessage() {} + +func (x *AllocationPolicy_Disk) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_Disk.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_Disk) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 1} +} + +func (m *AllocationPolicy_Disk) GetDataSource() isAllocationPolicy_Disk_DataSource { + if m != nil { + return m.DataSource + } + return nil +} + +func (x *AllocationPolicy_Disk) GetImage() string { + if x, ok := x.GetDataSource().(*AllocationPolicy_Disk_Image); ok { + return x.Image + } + return "" +} + +func (x *AllocationPolicy_Disk) GetSnapshot() string { + if x, ok := x.GetDataSource().(*AllocationPolicy_Disk_Snapshot); ok { + return x.Snapshot + } + return "" +} + +func (x *AllocationPolicy_Disk) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *AllocationPolicy_Disk) GetSizeGb() int64 { + if x != nil { + return x.SizeGb + } + return 0 +} + +func (x *AllocationPolicy_Disk) GetDiskInterface() string { + if x != nil { + return x.DiskInterface + } + return "" +} + +type isAllocationPolicy_Disk_DataSource interface { + isAllocationPolicy_Disk_DataSource() +} + +type AllocationPolicy_Disk_Image struct { + // URL for a VM image to use as the data source for this disk. + // For example, the following are all valid URLs: + // + // * Specify the image by its family name: + // projects/{project}/global/images/family/{image_family} + // * Specify the image version: + // projects/{project}/global/images/{image_version} + // + // You can also use Batch customized image in short names. + // The following image values are supported for a boot disk: + // + // * `batch-debian`: use Batch Debian images. + // * `batch-centos`: use Batch CentOS images. + // * `batch-cos`: use Batch Container-Optimized images. + // * `batch-hpc-centos`: use Batch HPC CentOS images. + // * `batch-hpc-rocky`: use Batch HPC Rocky Linux images. + Image string `protobuf:"bytes,4,opt,name=image,proto3,oneof"` +} + +type AllocationPolicy_Disk_Snapshot struct { + // Name of a snapshot used as the data source. + // Snapshot is not supported as boot disk now. + Snapshot string `protobuf:"bytes,5,opt,name=snapshot,proto3,oneof"` +} + +func (*AllocationPolicy_Disk_Image) isAllocationPolicy_Disk_DataSource() {} + +func (*AllocationPolicy_Disk_Snapshot) isAllocationPolicy_Disk_DataSource() {} + +// A new or an existing persistent disk (PD) or a local ssd attached to a VM +// instance. +type AllocationPolicy_AttachedDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Attached: + // + // *AllocationPolicy_AttachedDisk_NewDisk + // *AllocationPolicy_AttachedDisk_ExistingDisk + Attached isAllocationPolicy_AttachedDisk_Attached `protobuf_oneof:"attached"` + // Device name that the guest operating system will see. + // It is used by Runnable.volumes field to mount disks. So please specify + // the device_name if you want Batch to help mount the disk, and it should + // match the device_name field in volumes. + DeviceName string `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` +} + +func (x *AllocationPolicy_AttachedDisk) Reset() { + *x = AllocationPolicy_AttachedDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_AttachedDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_AttachedDisk) ProtoMessage() {} + +func (x *AllocationPolicy_AttachedDisk) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_AttachedDisk.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_AttachedDisk) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 2} +} + +func (m *AllocationPolicy_AttachedDisk) GetAttached() isAllocationPolicy_AttachedDisk_Attached { + if m != nil { + return m.Attached + } + return nil +} + +func (x *AllocationPolicy_AttachedDisk) GetNewDisk() *AllocationPolicy_Disk { + if x, ok := x.GetAttached().(*AllocationPolicy_AttachedDisk_NewDisk); ok { + return x.NewDisk + } + return nil +} + +func (x *AllocationPolicy_AttachedDisk) GetExistingDisk() string { + if x, ok := x.GetAttached().(*AllocationPolicy_AttachedDisk_ExistingDisk); ok { + return x.ExistingDisk + } + return "" +} + +func (x *AllocationPolicy_AttachedDisk) GetDeviceName() string { + if x != nil { + return x.DeviceName + } + return "" +} + +type isAllocationPolicy_AttachedDisk_Attached interface { + isAllocationPolicy_AttachedDisk_Attached() +} + +type AllocationPolicy_AttachedDisk_NewDisk struct { + NewDisk *AllocationPolicy_Disk `protobuf:"bytes,1,opt,name=new_disk,json=newDisk,proto3,oneof"` +} + +type AllocationPolicy_AttachedDisk_ExistingDisk struct { + // Name of an existing PD. + ExistingDisk string `protobuf:"bytes,2,opt,name=existing_disk,json=existingDisk,proto3,oneof"` +} + +func (*AllocationPolicy_AttachedDisk_NewDisk) isAllocationPolicy_AttachedDisk_Attached() {} + +func (*AllocationPolicy_AttachedDisk_ExistingDisk) isAllocationPolicy_AttachedDisk_Attached() {} + +// Accelerator describes Compute Engine accelerators to be attached to the VM. +type AllocationPolicy_Accelerator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The accelerator type. For example, "nvidia-tesla-t4". + // See `gcloud compute accelerator-types list`. + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // The number of accelerators of this type. + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + // Deprecated: please use instances[0].install_gpu_drivers instead. + // + // Deprecated: Marked as deprecated in google/cloud/batch/v1/job.proto. + InstallGpuDrivers bool `protobuf:"varint,3,opt,name=install_gpu_drivers,json=installGpuDrivers,proto3" json:"install_gpu_drivers,omitempty"` + // Optional. The NVIDIA GPU driver version that should be installed for this + // type. + // + // You can define the specific driver version such as "470.103.01", + // following the driver version requirements in + // https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. + // Batch will install the specific accelerator driver if qualified. + DriverVersion string `protobuf:"bytes,4,opt,name=driver_version,json=driverVersion,proto3" json:"driver_version,omitempty"` +} + +func (x *AllocationPolicy_Accelerator) Reset() { + *x = AllocationPolicy_Accelerator{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_Accelerator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_Accelerator) ProtoMessage() {} + +func (x *AllocationPolicy_Accelerator) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_Accelerator.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_Accelerator) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 3} +} + +func (x *AllocationPolicy_Accelerator) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *AllocationPolicy_Accelerator) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// Deprecated: Marked as deprecated in google/cloud/batch/v1/job.proto. +func (x *AllocationPolicy_Accelerator) GetInstallGpuDrivers() bool { + if x != nil { + return x.InstallGpuDrivers + } + return false +} + +func (x *AllocationPolicy_Accelerator) GetDriverVersion() string { + if x != nil { + return x.DriverVersion + } + return "" +} + +// InstancePolicy describes an instance type and resources attached to each VM +// created by this InstancePolicy. +type AllocationPolicy_InstancePolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Compute Engine machine type. + MachineType string `protobuf:"bytes,2,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + // The minimum CPU platform. + // See + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + MinCpuPlatform string `protobuf:"bytes,3,opt,name=min_cpu_platform,json=minCpuPlatform,proto3" json:"min_cpu_platform,omitempty"` + // The provisioning model. + ProvisioningModel AllocationPolicy_ProvisioningModel `protobuf:"varint,4,opt,name=provisioning_model,json=provisioningModel,proto3,enum=google.cloud.batch.v1.AllocationPolicy_ProvisioningModel" json:"provisioning_model,omitempty"` + // The accelerators attached to each VM instance. + Accelerators []*AllocationPolicy_Accelerator `protobuf:"bytes,5,rep,name=accelerators,proto3" json:"accelerators,omitempty"` + // Boot disk to be created and attached to each VM by this InstancePolicy. + // Boot disk will be deleted when the VM is deleted. + // Batch API now only supports booting from image. + BootDisk *AllocationPolicy_Disk `protobuf:"bytes,8,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` + // Non-boot disks to be attached for each VM created by this InstancePolicy. + // New disks will be deleted when the VM is deleted. + // A non-boot disk is a disk that can be of a device with a + // file system or a raw storage drive that is not ready for data + // storage and accessing. + Disks []*AllocationPolicy_AttachedDisk `protobuf:"bytes,6,rep,name=disks,proto3" json:"disks,omitempty"` + // Optional. If specified, VMs will consume only the specified reservation. + // If not specified (default), VMs will consume any applicable reservation. + Reservation string `protobuf:"bytes,7,opt,name=reservation,proto3" json:"reservation,omitempty"` +} + +func (x *AllocationPolicy_InstancePolicy) Reset() { + *x = AllocationPolicy_InstancePolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_InstancePolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_InstancePolicy) ProtoMessage() {} + +func (x *AllocationPolicy_InstancePolicy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_InstancePolicy.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_InstancePolicy) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 4} +} + +func (x *AllocationPolicy_InstancePolicy) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *AllocationPolicy_InstancePolicy) GetMinCpuPlatform() string { + if x != nil { + return x.MinCpuPlatform + } + return "" +} + +func (x *AllocationPolicy_InstancePolicy) GetProvisioningModel() AllocationPolicy_ProvisioningModel { + if x != nil { + return x.ProvisioningModel + } + return AllocationPolicy_PROVISIONING_MODEL_UNSPECIFIED +} + +func (x *AllocationPolicy_InstancePolicy) GetAccelerators() []*AllocationPolicy_Accelerator { + if x != nil { + return x.Accelerators + } + return nil +} + +func (x *AllocationPolicy_InstancePolicy) GetBootDisk() *AllocationPolicy_Disk { + if x != nil { + return x.BootDisk + } + return nil +} + +func (x *AllocationPolicy_InstancePolicy) GetDisks() []*AllocationPolicy_AttachedDisk { + if x != nil { + return x.Disks + } + return nil +} + +func (x *AllocationPolicy_InstancePolicy) GetReservation() string { + if x != nil { + return x.Reservation + } + return "" +} + +// InstancePolicyOrTemplate lets you define the type of resources to use for +// this job either with an InstancePolicy or an instance template. +// If undefined, Batch picks the type of VM to use and doesn't include +// optional VM resources such as GPUs and extra disks. +type AllocationPolicy_InstancePolicyOrTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to PolicyTemplate: + // + // *AllocationPolicy_InstancePolicyOrTemplate_Policy + // *AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplate + PolicyTemplate isAllocationPolicy_InstancePolicyOrTemplate_PolicyTemplate `protobuf_oneof:"policy_template"` + // Set this field true if users want Batch to help fetch drivers from a + // third party location and install them for GPUs specified in + // policy.accelerators or instance_template on their behalf. Default is + // false. + // + // For Container-Optimized Image cases, Batch will install the + // accelerator driver following milestones of + // https://cloud.google.com/container-optimized-os/docs/release-notes. For + // non Container-Optimized Image cases, following + // https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py. + InstallGpuDrivers bool `protobuf:"varint,3,opt,name=install_gpu_drivers,json=installGpuDrivers,proto3" json:"install_gpu_drivers,omitempty"` +} + +func (x *AllocationPolicy_InstancePolicyOrTemplate) Reset() { + *x = AllocationPolicy_InstancePolicyOrTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_InstancePolicyOrTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_InstancePolicyOrTemplate) ProtoMessage() {} + +func (x *AllocationPolicy_InstancePolicyOrTemplate) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_InstancePolicyOrTemplate.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_InstancePolicyOrTemplate) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 5} +} + +func (m *AllocationPolicy_InstancePolicyOrTemplate) GetPolicyTemplate() isAllocationPolicy_InstancePolicyOrTemplate_PolicyTemplate { + if m != nil { + return m.PolicyTemplate + } + return nil +} + +func (x *AllocationPolicy_InstancePolicyOrTemplate) GetPolicy() *AllocationPolicy_InstancePolicy { + if x, ok := x.GetPolicyTemplate().(*AllocationPolicy_InstancePolicyOrTemplate_Policy); ok { + return x.Policy + } + return nil +} + +func (x *AllocationPolicy_InstancePolicyOrTemplate) GetInstanceTemplate() string { + if x, ok := x.GetPolicyTemplate().(*AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplate); ok { + return x.InstanceTemplate + } + return "" +} + +func (x *AllocationPolicy_InstancePolicyOrTemplate) GetInstallGpuDrivers() bool { + if x != nil { + return x.InstallGpuDrivers + } + return false +} + +type isAllocationPolicy_InstancePolicyOrTemplate_PolicyTemplate interface { + isAllocationPolicy_InstancePolicyOrTemplate_PolicyTemplate() +} + +type AllocationPolicy_InstancePolicyOrTemplate_Policy struct { + // InstancePolicy. + Policy *AllocationPolicy_InstancePolicy `protobuf:"bytes,1,opt,name=policy,proto3,oneof"` +} + +type AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplate struct { + // Name of an instance template used to create VMs. + // Named the field as 'instance_template' instead of 'template' to avoid + // c++ keyword conflict. + InstanceTemplate string `protobuf:"bytes,2,opt,name=instance_template,json=instanceTemplate,proto3,oneof"` +} + +func (*AllocationPolicy_InstancePolicyOrTemplate_Policy) isAllocationPolicy_InstancePolicyOrTemplate_PolicyTemplate() { +} + +func (*AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplate) isAllocationPolicy_InstancePolicyOrTemplate_PolicyTemplate() { +} + +// A network interface. +type AllocationPolicy_NetworkInterface struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The URL of an existing network resource. + // You can specify the network as a full or partial URL. + // + // For example, the following are all valid URLs: + // + // * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // * projects/{project}/global/networks/{network} + // * global/networks/{network} + Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` + // The URL of an existing subnetwork resource in the network. + // You can specify the subnetwork as a full or partial URL. + // + // For example, the following are all valid URLs: + // + // * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * regions/{region}/subnetworks/{subnetwork} + Subnetwork string `protobuf:"bytes,2,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` + // Default is false (with an external IP address). Required if + // no external public IP address is attached to the VM. If no external + // public IP address, additional configuration is required to allow the VM + // to access Google Services. See + // https://cloud.google.com/vpc/docs/configure-private-google-access and + // https://cloud.google.com/nat/docs/gce-example#create-nat for more + // information. + NoExternalIpAddress bool `protobuf:"varint,3,opt,name=no_external_ip_address,json=noExternalIpAddress,proto3" json:"no_external_ip_address,omitempty"` +} + +func (x *AllocationPolicy_NetworkInterface) Reset() { + *x = AllocationPolicy_NetworkInterface{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_NetworkInterface) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_NetworkInterface) ProtoMessage() {} + +func (x *AllocationPolicy_NetworkInterface) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_NetworkInterface.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_NetworkInterface) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 6} +} + +func (x *AllocationPolicy_NetworkInterface) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *AllocationPolicy_NetworkInterface) GetSubnetwork() string { + if x != nil { + return x.Subnetwork + } + return "" +} + +func (x *AllocationPolicy_NetworkInterface) GetNoExternalIpAddress() bool { + if x != nil { + return x.NoExternalIpAddress + } + return false +} + +// NetworkPolicy describes VM instance network configurations. +type AllocationPolicy_NetworkPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Network configurations. + NetworkInterfaces []*AllocationPolicy_NetworkInterface `protobuf:"bytes,1,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` +} + +func (x *AllocationPolicy_NetworkPolicy) Reset() { + *x = AllocationPolicy_NetworkPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_NetworkPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_NetworkPolicy) ProtoMessage() {} + +func (x *AllocationPolicy_NetworkPolicy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_NetworkPolicy.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_NetworkPolicy) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 7} +} + +func (x *AllocationPolicy_NetworkPolicy) GetNetworkInterfaces() []*AllocationPolicy_NetworkInterface { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +// PlacementPolicy describes a group placement policy for the VMs controlled +// by this AllocationPolicy. +type AllocationPolicy_PlacementPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + // want VMs to be located close to each other for low network latency + // between the VMs. No placement policy will be generated when collocation + // is UNSPECIFIED. + Collocation string `protobuf:"bytes,1,opt,name=collocation,proto3" json:"collocation,omitempty"` + // When specified, causes the job to fail if more than max_distance logical + // switches are required between VMs. Batch uses the most compact possible + // placement of VMs even when max_distance is not specified. An explicit + // max_distance makes that level of compactness a strict requirement. + // Not yet implemented + MaxDistance int64 `protobuf:"varint,2,opt,name=max_distance,json=maxDistance,proto3" json:"max_distance,omitempty"` +} + +func (x *AllocationPolicy_PlacementPolicy) Reset() { + *x = AllocationPolicy_PlacementPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationPolicy_PlacementPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationPolicy_PlacementPolicy) ProtoMessage() {} + +func (x *AllocationPolicy_PlacementPolicy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationPolicy_PlacementPolicy.ProtoReflect.Descriptor instead. +func (*AllocationPolicy_PlacementPolicy) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 8} +} + +func (x *AllocationPolicy_PlacementPolicy) GetCollocation() string { + if x != nil { + return x.Collocation + } + return "" +} + +func (x *AllocationPolicy_PlacementPolicy) GetMaxDistance() int64 { + if x != nil { + return x.MaxDistance + } + return 0 +} + +var File_google_cloud_batch_v1_job_proto protoreflect.FileDescriptor + +var file_google_cloud_batch_v1_job_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x06, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x12, 0x54, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0b, + 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x4c, 0x0a, 0x0d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x4a, 0x6f, 0x62, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x39, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x51, 0xea, 0x41, 0x4e, 0x0a, 0x18, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4a, 0x6f, 0x62, 0x12, 0x32, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x7d, 0x22, 0x99, 0x03, 0x0a, + 0x0a, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6c, 0x6f, 0x67, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x6b, 0x0a, 0x14, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x12, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x67, 0x0a, 0x12, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x23, + 0x75, 0x73, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1f, + 0x75, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x6f, + 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, + 0x47, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, + 0x0a, 0x17, 0x44, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x43, + 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x4c, 0x4f, 0x47, 0x47, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, + 0x0a, 0x04, 0x50, 0x41, 0x54, 0x48, 0x10, 0x02, 0x22, 0x8d, 0x08, 0x0a, 0x09, 0x4a, 0x6f, 0x62, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x51, 0x0a, + 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x75, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0b, 0x72, 0x75, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x85, + 0x02, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x68, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x11, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x49, 0x0a, 0x09, 0x62, + 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x08, 0x62, 0x6f, + 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x1a, 0xf1, 0x01, 0x0a, 0x0f, 0x54, 0x61, 0x73, 0x6b, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x54, 0x0a, 0x06, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x12, 0x4d, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, + 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6f, 0x0a, 0x0f, 0x54, 0x61, + 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7b, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x51, + 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x43, 0x48, 0x45, 0x44, + 0x55, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, + 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x18, + 0x0a, 0x14, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, + 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x06, 0x22, 0xb3, 0x03, 0x0a, 0x0f, 0x4a, 0x6f, 0x62, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, + 0x48, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0xe5, 0x01, 0x0a, 0x07, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x6a, 0x6f, + 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, + 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x02, 0x22, 0x84, + 0x12, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x52, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x4f, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x4f, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x07, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x55, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x3d, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x9f, 0x01, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, + 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x69, 0x7a, 0x65, 0x5f, + 0x67, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x62, + 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x6b, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0xad, 0x01, 0x0a, 0x0c, 0x41, 0x74, 0x74, 0x61, 0x63, + 0x68, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x49, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x64, + 0x69, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x44, 0x69, + 0x73, 0x6b, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x69, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x61, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x1a, 0x97, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x65, 0x6c, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x32, 0x0a, 0x13, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x5f, 0x67, 0x70, 0x75, 0x5f, + 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x47, 0x70, 0x75, 0x44, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x1a, 0xde, 0x03, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x70, + 0x75, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x43, 0x70, 0x75, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x12, 0x68, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x57, 0x0a, 0x0c, 0x61, 0x63, + 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x6c, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x6b, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x44, 0x69, 0x73, 0x6b, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x4a, + 0x0a, 0x05, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, + 0x69, 0x73, 0x6b, 0x52, 0x05, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x25, 0x0a, 0x0b, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0xde, 0x01, 0x0a, 0x18, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4f, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x50, + 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x2d, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x2e, 0x0a, 0x13, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x5f, 0x67, 0x70, 0x75, 0x5f, 0x64, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x47, 0x70, 0x75, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x42, + 0x11, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x1a, 0x81, 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x6f, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x6e, 0x6f, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x70, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x78, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x67, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x11, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, + 0x1a, 0x56, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x69, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, + 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x60, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x56, + 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x50, + 0x4f, 0x54, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x45, 0x45, 0x4d, 0x50, 0x54, 0x49, + 0x42, 0x4c, 0x45, 0x10, 0x03, 0x22, 0xd8, 0x05, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x09, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, + 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, + 0x12, 0x5e, 0x0a, 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x10, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x4f, 0x0a, 0x11, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x10, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, + 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x73, 0x68, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x76, 0x65, 0x53, 0x73, 0x68, 0x12, 0x2a, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x5f, 0x61, 0x73, 0x5f, + 0x6e, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x75, 0x6e, 0x41, 0x73, 0x4e, 0x6f, 0x6e, 0x52, 0x6f, 0x6f, + 0x74, 0x22, 0x5c, 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, + 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x53, 0x5f, 0x53, + 0x4f, 0x4f, 0x4e, 0x5f, 0x41, 0x53, 0x5f, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x4c, 0x45, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x02, 0x3a, + 0x6f, 0xea, 0x41, 0x6c, 0x0a, 0x1e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, + 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x7d, + 0x22, 0x3e, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x42, 0xa9, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x08, + 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x70, 0x62, 0x3b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x47, 0x43, + 0x42, 0xaa, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x5c, 0x56, + 0x31, 0xea, 0x02, 0x18, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_batch_v1_job_proto_rawDescOnce sync.Once + file_google_cloud_batch_v1_job_proto_rawDescData = file_google_cloud_batch_v1_job_proto_rawDesc +) + +func file_google_cloud_batch_v1_job_proto_rawDescGZIP() []byte { + file_google_cloud_batch_v1_job_proto_rawDescOnce.Do(func() { + file_google_cloud_batch_v1_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_batch_v1_job_proto_rawDescData) + }) + return file_google_cloud_batch_v1_job_proto_rawDescData +} + +var file_google_cloud_batch_v1_job_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_google_cloud_batch_v1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_google_cloud_batch_v1_job_proto_goTypes = []interface{}{ + (LogsPolicy_Destination)(0), // 0: google.cloud.batch.v1.LogsPolicy.Destination + (JobStatus_State)(0), // 1: google.cloud.batch.v1.JobStatus.State + (JobNotification_Type)(0), // 2: google.cloud.batch.v1.JobNotification.Type + (AllocationPolicy_ProvisioningModel)(0), // 3: google.cloud.batch.v1.AllocationPolicy.ProvisioningModel + (TaskGroup_SchedulingPolicy)(0), // 4: google.cloud.batch.v1.TaskGroup.SchedulingPolicy + (*Job)(nil), // 5: google.cloud.batch.v1.Job + (*LogsPolicy)(nil), // 6: google.cloud.batch.v1.LogsPolicy + (*JobStatus)(nil), // 7: google.cloud.batch.v1.JobStatus + (*JobNotification)(nil), // 8: google.cloud.batch.v1.JobNotification + (*AllocationPolicy)(nil), // 9: google.cloud.batch.v1.AllocationPolicy + (*TaskGroup)(nil), // 10: google.cloud.batch.v1.TaskGroup + (*ServiceAccount)(nil), // 11: google.cloud.batch.v1.ServiceAccount + nil, // 12: google.cloud.batch.v1.Job.LabelsEntry + (*LogsPolicy_CloudLoggingOption)(nil), // 13: google.cloud.batch.v1.LogsPolicy.CloudLoggingOption + (*JobStatus_InstanceStatus)(nil), // 14: google.cloud.batch.v1.JobStatus.InstanceStatus + (*JobStatus_TaskGroupStatus)(nil), // 15: google.cloud.batch.v1.JobStatus.TaskGroupStatus + nil, // 16: google.cloud.batch.v1.JobStatus.TaskGroupsEntry + nil, // 17: google.cloud.batch.v1.JobStatus.TaskGroupStatus.CountsEntry + (*JobNotification_Message)(nil), // 18: google.cloud.batch.v1.JobNotification.Message + (*AllocationPolicy_LocationPolicy)(nil), // 19: google.cloud.batch.v1.AllocationPolicy.LocationPolicy + (*AllocationPolicy_Disk)(nil), // 20: google.cloud.batch.v1.AllocationPolicy.Disk + (*AllocationPolicy_AttachedDisk)(nil), // 21: google.cloud.batch.v1.AllocationPolicy.AttachedDisk + (*AllocationPolicy_Accelerator)(nil), // 22: google.cloud.batch.v1.AllocationPolicy.Accelerator + (*AllocationPolicy_InstancePolicy)(nil), // 23: google.cloud.batch.v1.AllocationPolicy.InstancePolicy + (*AllocationPolicy_InstancePolicyOrTemplate)(nil), // 24: google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate + (*AllocationPolicy_NetworkInterface)(nil), // 25: google.cloud.batch.v1.AllocationPolicy.NetworkInterface + (*AllocationPolicy_NetworkPolicy)(nil), // 26: google.cloud.batch.v1.AllocationPolicy.NetworkPolicy + (*AllocationPolicy_PlacementPolicy)(nil), // 27: google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + nil, // 28: google.cloud.batch.v1.AllocationPolicy.LabelsEntry + (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp + (*StatusEvent)(nil), // 30: google.cloud.batch.v1.StatusEvent + (*durationpb.Duration)(nil), // 31: google.protobuf.Duration + (*TaskSpec)(nil), // 32: google.cloud.batch.v1.TaskSpec + (*Environment)(nil), // 33: google.cloud.batch.v1.Environment + (TaskStatus_State)(0), // 34: google.cloud.batch.v1.TaskStatus.State +} +var file_google_cloud_batch_v1_job_proto_depIdxs = []int32{ + 10, // 0: google.cloud.batch.v1.Job.task_groups:type_name -> google.cloud.batch.v1.TaskGroup + 9, // 1: google.cloud.batch.v1.Job.allocation_policy:type_name -> google.cloud.batch.v1.AllocationPolicy + 12, // 2: google.cloud.batch.v1.Job.labels:type_name -> google.cloud.batch.v1.Job.LabelsEntry + 7, // 3: google.cloud.batch.v1.Job.status:type_name -> google.cloud.batch.v1.JobStatus + 29, // 4: google.cloud.batch.v1.Job.create_time:type_name -> google.protobuf.Timestamp + 29, // 5: google.cloud.batch.v1.Job.update_time:type_name -> google.protobuf.Timestamp + 6, // 6: google.cloud.batch.v1.Job.logs_policy:type_name -> google.cloud.batch.v1.LogsPolicy + 8, // 7: google.cloud.batch.v1.Job.notifications:type_name -> google.cloud.batch.v1.JobNotification + 0, // 8: google.cloud.batch.v1.LogsPolicy.destination:type_name -> google.cloud.batch.v1.LogsPolicy.Destination + 13, // 9: google.cloud.batch.v1.LogsPolicy.cloud_logging_option:type_name -> google.cloud.batch.v1.LogsPolicy.CloudLoggingOption + 1, // 10: google.cloud.batch.v1.JobStatus.state:type_name -> google.cloud.batch.v1.JobStatus.State + 30, // 11: google.cloud.batch.v1.JobStatus.status_events:type_name -> google.cloud.batch.v1.StatusEvent + 16, // 12: google.cloud.batch.v1.JobStatus.task_groups:type_name -> google.cloud.batch.v1.JobStatus.TaskGroupsEntry + 31, // 13: google.cloud.batch.v1.JobStatus.run_duration:type_name -> google.protobuf.Duration + 18, // 14: google.cloud.batch.v1.JobNotification.message:type_name -> google.cloud.batch.v1.JobNotification.Message + 19, // 15: google.cloud.batch.v1.AllocationPolicy.location:type_name -> google.cloud.batch.v1.AllocationPolicy.LocationPolicy + 24, // 16: google.cloud.batch.v1.AllocationPolicy.instances:type_name -> google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate + 11, // 17: google.cloud.batch.v1.AllocationPolicy.service_account:type_name -> google.cloud.batch.v1.ServiceAccount + 28, // 18: google.cloud.batch.v1.AllocationPolicy.labels:type_name -> google.cloud.batch.v1.AllocationPolicy.LabelsEntry + 26, // 19: google.cloud.batch.v1.AllocationPolicy.network:type_name -> google.cloud.batch.v1.AllocationPolicy.NetworkPolicy + 27, // 20: google.cloud.batch.v1.AllocationPolicy.placement:type_name -> google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + 32, // 21: google.cloud.batch.v1.TaskGroup.task_spec:type_name -> google.cloud.batch.v1.TaskSpec + 4, // 22: google.cloud.batch.v1.TaskGroup.scheduling_policy:type_name -> google.cloud.batch.v1.TaskGroup.SchedulingPolicy + 33, // 23: google.cloud.batch.v1.TaskGroup.task_environments:type_name -> google.cloud.batch.v1.Environment + 3, // 24: google.cloud.batch.v1.JobStatus.InstanceStatus.provisioning_model:type_name -> google.cloud.batch.v1.AllocationPolicy.ProvisioningModel + 20, // 25: google.cloud.batch.v1.JobStatus.InstanceStatus.boot_disk:type_name -> google.cloud.batch.v1.AllocationPolicy.Disk + 17, // 26: google.cloud.batch.v1.JobStatus.TaskGroupStatus.counts:type_name -> google.cloud.batch.v1.JobStatus.TaskGroupStatus.CountsEntry + 14, // 27: google.cloud.batch.v1.JobStatus.TaskGroupStatus.instances:type_name -> google.cloud.batch.v1.JobStatus.InstanceStatus + 15, // 28: google.cloud.batch.v1.JobStatus.TaskGroupsEntry.value:type_name -> google.cloud.batch.v1.JobStatus.TaskGroupStatus + 2, // 29: google.cloud.batch.v1.JobNotification.Message.type:type_name -> google.cloud.batch.v1.JobNotification.Type + 1, // 30: google.cloud.batch.v1.JobNotification.Message.new_job_state:type_name -> google.cloud.batch.v1.JobStatus.State + 34, // 31: google.cloud.batch.v1.JobNotification.Message.new_task_state:type_name -> google.cloud.batch.v1.TaskStatus.State + 20, // 32: google.cloud.batch.v1.AllocationPolicy.AttachedDisk.new_disk:type_name -> google.cloud.batch.v1.AllocationPolicy.Disk + 3, // 33: google.cloud.batch.v1.AllocationPolicy.InstancePolicy.provisioning_model:type_name -> google.cloud.batch.v1.AllocationPolicy.ProvisioningModel + 22, // 34: google.cloud.batch.v1.AllocationPolicy.InstancePolicy.accelerators:type_name -> google.cloud.batch.v1.AllocationPolicy.Accelerator + 20, // 35: google.cloud.batch.v1.AllocationPolicy.InstancePolicy.boot_disk:type_name -> google.cloud.batch.v1.AllocationPolicy.Disk + 21, // 36: google.cloud.batch.v1.AllocationPolicy.InstancePolicy.disks:type_name -> google.cloud.batch.v1.AllocationPolicy.AttachedDisk + 23, // 37: google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate.policy:type_name -> google.cloud.batch.v1.AllocationPolicy.InstancePolicy + 25, // 38: google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.network_interfaces:type_name -> google.cloud.batch.v1.AllocationPolicy.NetworkInterface + 39, // [39:39] is the sub-list for method output_type + 39, // [39:39] is the sub-list for method input_type + 39, // [39:39] is the sub-list for extension type_name + 39, // [39:39] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name +} + +func init() { file_google_cloud_batch_v1_job_proto_init() } +func file_google_cloud_batch_v1_job_proto_init() { + if File_google_cloud_batch_v1_job_proto != nil { + return + } + file_google_cloud_batch_v1_task_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_batch_v1_job_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Job); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogsPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobNotification); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogsPolicy_CloudLoggingOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobStatus_InstanceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobStatus_TaskGroupStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobNotification_Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_LocationPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_Disk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_AttachedDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_Accelerator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_InstancePolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_InstancePolicyOrTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_NetworkInterface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_NetworkPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllocationPolicy_PlacementPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_batch_v1_job_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*AllocationPolicy_Disk_Image)(nil), + (*AllocationPolicy_Disk_Snapshot)(nil), + } + file_google_cloud_batch_v1_job_proto_msgTypes[16].OneofWrappers = []interface{}{ + (*AllocationPolicy_AttachedDisk_NewDisk)(nil), + (*AllocationPolicy_AttachedDisk_ExistingDisk)(nil), + } + file_google_cloud_batch_v1_job_proto_msgTypes[19].OneofWrappers = []interface{}{ + (*AllocationPolicy_InstancePolicyOrTemplate_Policy)(nil), + (*AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplate)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_batch_v1_job_proto_rawDesc, + NumEnums: 5, + NumMessages: 24, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_batch_v1_job_proto_goTypes, + DependencyIndexes: file_google_cloud_batch_v1_job_proto_depIdxs, + EnumInfos: file_google_cloud_batch_v1_job_proto_enumTypes, + MessageInfos: file_google_cloud_batch_v1_job_proto_msgTypes, + }.Build() + File_google_cloud_batch_v1_job_proto = out.File + file_google_cloud_batch_v1_job_proto_rawDesc = nil + file_google_cloud_batch_v1_job_proto_goTypes = nil + file_google_cloud_batch_v1_job_proto_depIdxs = nil +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/batchpb/task.pb.go b/vendor/cloud.google.com/go/batch/apiv1/batchpb/task.pb.go new file mode 100644 index 000000000..069c28237 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/batchpb/task.pb.go @@ -0,0 +1,1927 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: google/cloud/batch/v1/task.proto + +package batchpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Task states. +type TaskStatus_State int32 + +const ( + // Unknown state. + TaskStatus_STATE_UNSPECIFIED TaskStatus_State = 0 + // The Task is created and waiting for resources. + TaskStatus_PENDING TaskStatus_State = 1 + // The Task is assigned to at least one VM. + TaskStatus_ASSIGNED TaskStatus_State = 2 + // The Task is running. + TaskStatus_RUNNING TaskStatus_State = 3 + // The Task has failed. + TaskStatus_FAILED TaskStatus_State = 4 + // The Task has succeeded. + TaskStatus_SUCCEEDED TaskStatus_State = 5 + // The Task has not been executed when the Job finishes. + TaskStatus_UNEXECUTED TaskStatus_State = 6 +) + +// Enum value maps for TaskStatus_State. +var ( + TaskStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "PENDING", + 2: "ASSIGNED", + 3: "RUNNING", + 4: "FAILED", + 5: "SUCCEEDED", + 6: "UNEXECUTED", + } + TaskStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "ASSIGNED": 2, + "RUNNING": 3, + "FAILED": 4, + "SUCCEEDED": 5, + "UNEXECUTED": 6, + } +) + +func (x TaskStatus_State) Enum() *TaskStatus_State { + p := new(TaskStatus_State) + *p = x + return p +} + +func (x TaskStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_batch_v1_task_proto_enumTypes[0].Descriptor() +} + +func (TaskStatus_State) Type() protoreflect.EnumType { + return &file_google_cloud_batch_v1_task_proto_enumTypes[0] +} + +func (x TaskStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskStatus_State.Descriptor instead. +func (TaskStatus_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{3, 0} +} + +// Action on task failures based on different conditions. +type LifecyclePolicy_Action int32 + +const ( + // Action unspecified. + LifecyclePolicy_ACTION_UNSPECIFIED LifecyclePolicy_Action = 0 + // Action that tasks in the group will be scheduled to re-execute. + LifecyclePolicy_RETRY_TASK LifecyclePolicy_Action = 1 + // Action that tasks in the group will be stopped immediately. + LifecyclePolicy_FAIL_TASK LifecyclePolicy_Action = 2 +) + +// Enum value maps for LifecyclePolicy_Action. +var ( + LifecyclePolicy_Action_name = map[int32]string{ + 0: "ACTION_UNSPECIFIED", + 1: "RETRY_TASK", + 2: "FAIL_TASK", + } + LifecyclePolicy_Action_value = map[string]int32{ + "ACTION_UNSPECIFIED": 0, + "RETRY_TASK": 1, + "FAIL_TASK": 2, + } +) + +func (x LifecyclePolicy_Action) Enum() *LifecyclePolicy_Action { + p := new(LifecyclePolicy_Action) + *p = x + return p +} + +func (x LifecyclePolicy_Action) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LifecyclePolicy_Action) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_batch_v1_task_proto_enumTypes[1].Descriptor() +} + +func (LifecyclePolicy_Action) Type() protoreflect.EnumType { + return &file_google_cloud_batch_v1_task_proto_enumTypes[1] +} + +func (x LifecyclePolicy_Action) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LifecyclePolicy_Action.Descriptor instead. +func (LifecyclePolicy_Action) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{6, 0} +} + +// Compute resource requirements. +// +// ComputeResource defines the amount of resources required for each task. +// Make sure your tasks have enough resources to successfully run. +// If you also define the types of resources for a job to use with the +// [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) +// field, make sure both fields are compatible with each other. +type ComputeResource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The milliCPU count. + // + // `cpuMilli` defines the amount of CPU resources per task in milliCPU units. + // For example, `1000` corresponds to 1 vCPU per task. If undefined, the + // default value is `2000`. + // + // If you also define the VM's machine type using the `machineType` in + // [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + // field or inside the `instanceTemplate` in the + // [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + // field, make sure the CPU resources for both fields are compatible with each + // other and with how many tasks you want to allow to run on the same VM at + // the same time. + // + // For example, if you specify the `n2-standard-2` machine type, which has 2 + // vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or + // you are recommended to run two tasks on the same VM if you set `cpuMilli` + // to `1000` or less. + CpuMilli int64 `protobuf:"varint,1,opt,name=cpu_milli,json=cpuMilli,proto3" json:"cpu_milli,omitempty"` + // Memory in MiB. + // + // `memoryMib` defines the amount of memory per task in MiB units. + // If undefined, the default value is `2000`. + // If you also define the VM's machine type using the `machineType` in + // [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy) + // field or inside the `instanceTemplate` in the + // [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) + // field, make sure the memory resources for both fields are compatible with + // each other and with how many tasks you want to allow to run on the same VM + // at the same time. + // + // For example, if you specify the `n2-standard-2` machine type, which has 8 + // GiB each, you are recommended to set `memoryMib` to no more than `8192`, + // or you are recommended to run two tasks on the same VM if you set + // `memoryMib` to `4096` or less. + MemoryMib int64 `protobuf:"varint,2,opt,name=memory_mib,json=memoryMib,proto3" json:"memory_mib,omitempty"` + // Extra boot disk size in MiB for each task. + BootDiskMib int64 `protobuf:"varint,4,opt,name=boot_disk_mib,json=bootDiskMib,proto3" json:"boot_disk_mib,omitempty"` +} + +func (x *ComputeResource) Reset() { + *x = ComputeResource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComputeResource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComputeResource) ProtoMessage() {} + +func (x *ComputeResource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComputeResource.ProtoReflect.Descriptor instead. +func (*ComputeResource) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{0} +} + +func (x *ComputeResource) GetCpuMilli() int64 { + if x != nil { + return x.CpuMilli + } + return 0 +} + +func (x *ComputeResource) GetMemoryMib() int64 { + if x != nil { + return x.MemoryMib + } + return 0 +} + +func (x *ComputeResource) GetBootDiskMib() int64 { + if x != nil { + return x.BootDiskMib + } + return 0 +} + +// Status event +type StatusEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type of the event. + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + // Description of the event. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The time this event occurred. + EventTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` + // Task Execution + TaskExecution *TaskExecution `protobuf:"bytes,4,opt,name=task_execution,json=taskExecution,proto3" json:"task_execution,omitempty"` + // Task State + TaskState TaskStatus_State `protobuf:"varint,5,opt,name=task_state,json=taskState,proto3,enum=google.cloud.batch.v1.TaskStatus_State" json:"task_state,omitempty"` +} + +func (x *StatusEvent) Reset() { + *x = StatusEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatusEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusEvent) ProtoMessage() {} + +func (x *StatusEvent) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusEvent.ProtoReflect.Descriptor instead. +func (*StatusEvent) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{1} +} + +func (x *StatusEvent) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *StatusEvent) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *StatusEvent) GetEventTime() *timestamppb.Timestamp { + if x != nil { + return x.EventTime + } + return nil +} + +func (x *StatusEvent) GetTaskExecution() *TaskExecution { + if x != nil { + return x.TaskExecution + } + return nil +} + +func (x *StatusEvent) GetTaskState() TaskStatus_State { + if x != nil { + return x.TaskState + } + return TaskStatus_STATE_UNSPECIFIED +} + +// This Task Execution field includes detail information for +// task execution procedures, based on StatusEvent types. +type TaskExecution struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // When task is completed as the status of FAILED or SUCCEEDED, + // exit code is for one task execution result, default is 0 as success. + ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` +} + +func (x *TaskExecution) Reset() { + *x = TaskExecution{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskExecution) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskExecution) ProtoMessage() {} + +func (x *TaskExecution) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskExecution.ProtoReflect.Descriptor instead. +func (*TaskExecution) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{2} +} + +func (x *TaskExecution) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +// Status of a task +type TaskStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Task state + State TaskStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.batch.v1.TaskStatus_State" json:"state,omitempty"` + // Detailed info about why the state is reached. + StatusEvents []*StatusEvent `protobuf:"bytes,2,rep,name=status_events,json=statusEvents,proto3" json:"status_events,omitempty"` +} + +func (x *TaskStatus) Reset() { + *x = TaskStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskStatus) ProtoMessage() {} + +func (x *TaskStatus) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskStatus.ProtoReflect.Descriptor instead. +func (*TaskStatus) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{3} +} + +func (x *TaskStatus) GetState() TaskStatus_State { + if x != nil { + return x.State + } + return TaskStatus_STATE_UNSPECIFIED +} + +func (x *TaskStatus) GetStatusEvents() []*StatusEvent { + if x != nil { + return x.StatusEvents + } + return nil +} + +// Runnable describes instructions for executing a specific script or container +// as part of a Task. +type Runnable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The script or container to run. + // + // Types that are assignable to Executable: + // + // *Runnable_Container_ + // *Runnable_Script_ + // *Runnable_Barrier_ + Executable isRunnable_Executable `protobuf_oneof:"executable"` + // Optional. DisplayName is an optional field that can be provided by the + // caller. If provided, it will be used in logs and other outputs to identify + // the script, making it easier for users to understand the logs. If not + // provided the index of the runnable will be used for outputs. + DisplayName string `protobuf:"bytes,10,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Normally, a non-zero exit status causes the Task to fail. This flag allows + // execution of other Runnables to continue instead. + IgnoreExitStatus bool `protobuf:"varint,3,opt,name=ignore_exit_status,json=ignoreExitStatus,proto3" json:"ignore_exit_status,omitempty"` + // This flag allows a Runnable to continue running in the background while the + // Task executes subsequent Runnables. This is useful to provide services to + // other Runnables (or to provide debugging support tools like SSH servers). + Background bool `protobuf:"varint,4,opt,name=background,proto3" json:"background,omitempty"` + // By default, after a Runnable fails, no further Runnable are executed. This + // flag indicates that this Runnable must be run even if the Task has already + // failed. This is useful for Runnables that copy output files off of the VM + // or for debugging. + // + // The always_run flag does not override the Task's overall max_run_duration. + // If the max_run_duration has expired then no further Runnables will execute, + // not even always_run Runnables. + AlwaysRun bool `protobuf:"varint,5,opt,name=always_run,json=alwaysRun,proto3" json:"always_run,omitempty"` + // Environment variables for this Runnable (overrides variables set for the + // whole Task or TaskGroup). + Environment *Environment `protobuf:"bytes,7,opt,name=environment,proto3" json:"environment,omitempty"` + // Timeout for this Runnable. + Timeout *durationpb.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` + // Labels for this Runnable. + Labels map[string]string `protobuf:"bytes,9,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Runnable) Reset() { + *x = Runnable{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Runnable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Runnable) ProtoMessage() {} + +func (x *Runnable) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Runnable.ProtoReflect.Descriptor instead. +func (*Runnable) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{4} +} + +func (m *Runnable) GetExecutable() isRunnable_Executable { + if m != nil { + return m.Executable + } + return nil +} + +func (x *Runnable) GetContainer() *Runnable_Container { + if x, ok := x.GetExecutable().(*Runnable_Container_); ok { + return x.Container + } + return nil +} + +func (x *Runnable) GetScript() *Runnable_Script { + if x, ok := x.GetExecutable().(*Runnable_Script_); ok { + return x.Script + } + return nil +} + +func (x *Runnable) GetBarrier() *Runnable_Barrier { + if x, ok := x.GetExecutable().(*Runnable_Barrier_); ok { + return x.Barrier + } + return nil +} + +func (x *Runnable) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Runnable) GetIgnoreExitStatus() bool { + if x != nil { + return x.IgnoreExitStatus + } + return false +} + +func (x *Runnable) GetBackground() bool { + if x != nil { + return x.Background + } + return false +} + +func (x *Runnable) GetAlwaysRun() bool { + if x != nil { + return x.AlwaysRun + } + return false +} + +func (x *Runnable) GetEnvironment() *Environment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *Runnable) GetTimeout() *durationpb.Duration { + if x != nil { + return x.Timeout + } + return nil +} + +func (x *Runnable) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +type isRunnable_Executable interface { + isRunnable_Executable() +} + +type Runnable_Container_ struct { + // Container runnable. + Container *Runnable_Container `protobuf:"bytes,1,opt,name=container,proto3,oneof"` +} + +type Runnable_Script_ struct { + // Script runnable. + Script *Runnable_Script `protobuf:"bytes,2,opt,name=script,proto3,oneof"` +} + +type Runnable_Barrier_ struct { + // Barrier runnable. + Barrier *Runnable_Barrier `protobuf:"bytes,6,opt,name=barrier,proto3,oneof"` +} + +func (*Runnable_Container_) isRunnable_Executable() {} + +func (*Runnable_Script_) isRunnable_Executable() {} + +func (*Runnable_Barrier_) isRunnable_Executable() {} + +// Spec of a task +type TaskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sequence of scripts or containers to run for this Task. Each Task using + // this TaskSpec executes its list of runnables in order. The Task succeeds if + // all of its runnables either exit with a zero status or any that exit with a + // non-zero status have the ignore_exit_status flag. + // + // Background runnables are killed automatically (if they have not already + // exited) a short time after all foreground runnables have completed. Even + // though this is likely to result in a non-zero exit status for the + // background runnable, these automatic kills are not treated as Task + // failures. + Runnables []*Runnable `protobuf:"bytes,8,rep,name=runnables,proto3" json:"runnables,omitempty"` + // ComputeResource requirements. + ComputeResource *ComputeResource `protobuf:"bytes,3,opt,name=compute_resource,json=computeResource,proto3" json:"compute_resource,omitempty"` + // Maximum duration the task should run. + // The task will be killed and marked as FAILED if over this limit. + MaxRunDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=max_run_duration,json=maxRunDuration,proto3" json:"max_run_duration,omitempty"` + // Maximum number of retries on failures. + // The default, 0, which means never retry. + // The valid value range is [0, 10]. + MaxRetryCount int32 `protobuf:"varint,5,opt,name=max_retry_count,json=maxRetryCount,proto3" json:"max_retry_count,omitempty"` + // Lifecycle management schema when any task in a task group is failed. + // Currently we only support one lifecycle policy. + // When the lifecycle policy condition is met, + // the action in the policy will execute. + // If task execution result does not meet with the defined lifecycle + // policy, we consider it as the default policy. + // Default policy means if the exit code is 0, exit task. + // If task ends with non-zero exit code, retry the task with max_retry_count. + LifecyclePolicies []*LifecyclePolicy `protobuf:"bytes,9,rep,name=lifecycle_policies,json=lifecyclePolicies,proto3" json:"lifecycle_policies,omitempty"` + // Deprecated: please use environment(non-plural) instead. + // + // Deprecated: Marked as deprecated in google/cloud/batch/v1/task.proto. + Environments map[string]string `protobuf:"bytes,6,rep,name=environments,proto3" json:"environments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Volumes to mount before running Tasks using this TaskSpec. + Volumes []*Volume `protobuf:"bytes,7,rep,name=volumes,proto3" json:"volumes,omitempty"` + // Environment variables to set before running the Task. + Environment *Environment `protobuf:"bytes,10,opt,name=environment,proto3" json:"environment,omitempty"` +} + +func (x *TaskSpec) Reset() { + *x = TaskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskSpec) ProtoMessage() {} + +func (x *TaskSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskSpec.ProtoReflect.Descriptor instead. +func (*TaskSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{5} +} + +func (x *TaskSpec) GetRunnables() []*Runnable { + if x != nil { + return x.Runnables + } + return nil +} + +func (x *TaskSpec) GetComputeResource() *ComputeResource { + if x != nil { + return x.ComputeResource + } + return nil +} + +func (x *TaskSpec) GetMaxRunDuration() *durationpb.Duration { + if x != nil { + return x.MaxRunDuration + } + return nil +} + +func (x *TaskSpec) GetMaxRetryCount() int32 { + if x != nil { + return x.MaxRetryCount + } + return 0 +} + +func (x *TaskSpec) GetLifecyclePolicies() []*LifecyclePolicy { + if x != nil { + return x.LifecyclePolicies + } + return nil +} + +// Deprecated: Marked as deprecated in google/cloud/batch/v1/task.proto. +func (x *TaskSpec) GetEnvironments() map[string]string { + if x != nil { + return x.Environments + } + return nil +} + +func (x *TaskSpec) GetVolumes() []*Volume { + if x != nil { + return x.Volumes + } + return nil +} + +func (x *TaskSpec) GetEnvironment() *Environment { + if x != nil { + return x.Environment + } + return nil +} + +// LifecyclePolicy describes how to deal with task failures +// based on different conditions. +type LifecyclePolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Action to execute when ActionCondition is true. + // When RETRY_TASK is specified, we will retry failed tasks + // if we notice any exit code match and fail tasks if no match is found. + // Likewise, when FAIL_TASK is specified, we will fail tasks + // if we notice any exit code match and retry tasks if no match is found. + Action LifecyclePolicy_Action `protobuf:"varint,1,opt,name=action,proto3,enum=google.cloud.batch.v1.LifecyclePolicy_Action" json:"action,omitempty"` + // Conditions that decide why a task failure is dealt with a specific action. + ActionCondition *LifecyclePolicy_ActionCondition `protobuf:"bytes,2,opt,name=action_condition,json=actionCondition,proto3" json:"action_condition,omitempty"` +} + +func (x *LifecyclePolicy) Reset() { + *x = LifecyclePolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecyclePolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecyclePolicy) ProtoMessage() {} + +func (x *LifecyclePolicy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecyclePolicy.ProtoReflect.Descriptor instead. +func (*LifecyclePolicy) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{6} +} + +func (x *LifecyclePolicy) GetAction() LifecyclePolicy_Action { + if x != nil { + return x.Action + } + return LifecyclePolicy_ACTION_UNSPECIFIED +} + +func (x *LifecyclePolicy) GetActionCondition() *LifecyclePolicy_ActionCondition { + if x != nil { + return x.ActionCondition + } + return nil +} + +// A Cloud Batch task. +type Task struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Task name. + // The name is generated from the parent TaskGroup name and 'id' field. + // For example: + // "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Task Status. + Status *TaskStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Task) Reset() { + *x = Task{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Task) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task) ProtoMessage() {} + +func (x *Task) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task.ProtoReflect.Descriptor instead. +func (*Task) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{7} +} + +func (x *Task) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Task) GetStatus() *TaskStatus { + if x != nil { + return x.Status + } + return nil +} + +// An Environment describes a collection of environment variables to set when +// executing Tasks. +type Environment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A map of environment variable names to values. + Variables map[string]string `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // A map of environment variable names to Secret Manager secret names. + // The VM will access the named secrets to set the value of each environment + // variable. + SecretVariables map[string]string `protobuf:"bytes,2,rep,name=secret_variables,json=secretVariables,proto3" json:"secret_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // An encrypted JSON dictionary where the key/value pairs correspond to + // environment variable names and their values. + EncryptedVariables *Environment_KMSEnvMap `protobuf:"bytes,3,opt,name=encrypted_variables,json=encryptedVariables,proto3" json:"encrypted_variables,omitempty"` +} + +func (x *Environment) Reset() { + *x = Environment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment) ProtoMessage() {} + +func (x *Environment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment.ProtoReflect.Descriptor instead. +func (*Environment) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{8} +} + +func (x *Environment) GetVariables() map[string]string { + if x != nil { + return x.Variables + } + return nil +} + +func (x *Environment) GetSecretVariables() map[string]string { + if x != nil { + return x.SecretVariables + } + return nil +} + +func (x *Environment) GetEncryptedVariables() *Environment_KMSEnvMap { + if x != nil { + return x.EncryptedVariables + } + return nil +} + +// Container runnable. +type Runnable_Container struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The URI to pull the container image from. + ImageUri string `protobuf:"bytes,1,opt,name=image_uri,json=imageUri,proto3" json:"image_uri,omitempty"` + // Overrides the `CMD` specified in the container. If there is an ENTRYPOINT + // (either in the container image or with the entrypoint field below) then + // commands are appended as arguments to the ENTRYPOINT. + Commands []string `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"` + // Overrides the `ENTRYPOINT` specified in the container. + Entrypoint string `protobuf:"bytes,3,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"` + // Volumes to mount (bind mount) from the host machine files or directories + // into the container, formatted to match docker run's --volume option, + // e.g. /foo:/bar, or /foo:/bar:ro + // + // If the `TaskSpec.Volumes` field is specified but this field is not, Batch + // will mount each volume from the host machine to the container with the + // same mount path by default. In this case, the default mount option for + // containers will be read-only (ro) for existing persistent disks and + // read-write (rw) for other volume types, regardless of the original mount + // options specified in `TaskSpec.Volumes`. If you need different mount + // settings, you can explicitly configure them in this field. + Volumes []string `protobuf:"bytes,7,rep,name=volumes,proto3" json:"volumes,omitempty"` + // Arbitrary additional options to include in the "docker run" command when + // running this container, e.g. "--network host". + Options string `protobuf:"bytes,8,opt,name=options,proto3" json:"options,omitempty"` + // If set to true, external network access to and from container will be + // blocked, containers that are with block_external_network as true can + // still communicate with each other, network cannot be specified in the + // `container.options` field. + BlockExternalNetwork bool `protobuf:"varint,9,opt,name=block_external_network,json=blockExternalNetwork,proto3" json:"block_external_network,omitempty"` + // Required if the container image is from a private Docker registry. The + // username to login to the Docker registry that contains the image. + // + // You can either specify the username directly by using plain text or + // specify an encrypted username by using a Secret Manager secret: + // `projects/*/secrets/*/versions/*`. However, using a secret is + // recommended for enhanced security. + // + // Caution: If you specify the username using plain text, you risk the + // username being exposed to any users who can view the job or its logs. + // To avoid this risk, specify a secret that contains the username instead. + // + // Learn more about [Secret + // Manager](https://cloud.google.com/secret-manager/docs/) and [using + // Secret Manager with + // Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"` + // Required if the container image is from a private Docker registry. The + // password to login to the Docker registry that contains the image. + // + // For security, it is strongly recommended to specify an + // encrypted password by using a Secret Manager secret: + // `projects/*/secrets/*/versions/*`. + // + // Warning: If you specify the password using plain text, you risk the + // password being exposed to any users who can view the job or its logs. + // To avoid this risk, specify a secret that contains the password instead. + // + // Learn more about [Secret + // Manager](https://cloud.google.com/secret-manager/docs/) and [using + // Secret Manager with + // Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager). + Password string `protobuf:"bytes,11,opt,name=password,proto3" json:"password,omitempty"` + // Optional. If set to true, this container runnable uses Image streaming. + // + // Use Image streaming to allow the runnable to initialize without + // waiting for the entire container image to download, which can + // significantly reduce startup time for large container images. + // + // When `enableImageStreaming` is set to true, the container + // runtime is [containerd](https://containerd.io/) instead of Docker. + // Additionally, this container runnable only supports the following + // `container` subfields: `imageUri`, + // `commands[]`, `entrypoint`, and + // `volumes[]`; any other `container` subfields are ignored. + // + // For more information about the requirements and limitations for using + // Image streaming with Batch, see the [`image-streaming` + // sample on + // GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming). + EnableImageStreaming bool `protobuf:"varint,12,opt,name=enable_image_streaming,json=enableImageStreaming,proto3" json:"enable_image_streaming,omitempty"` +} + +func (x *Runnable_Container) Reset() { + *x = Runnable_Container{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Runnable_Container) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Runnable_Container) ProtoMessage() {} + +func (x *Runnable_Container) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Runnable_Container.ProtoReflect.Descriptor instead. +func (*Runnable_Container) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *Runnable_Container) GetImageUri() string { + if x != nil { + return x.ImageUri + } + return "" +} + +func (x *Runnable_Container) GetCommands() []string { + if x != nil { + return x.Commands + } + return nil +} + +func (x *Runnable_Container) GetEntrypoint() string { + if x != nil { + return x.Entrypoint + } + return "" +} + +func (x *Runnable_Container) GetVolumes() []string { + if x != nil { + return x.Volumes + } + return nil +} + +func (x *Runnable_Container) GetOptions() string { + if x != nil { + return x.Options + } + return "" +} + +func (x *Runnable_Container) GetBlockExternalNetwork() bool { + if x != nil { + return x.BlockExternalNetwork + } + return false +} + +func (x *Runnable_Container) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *Runnable_Container) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *Runnable_Container) GetEnableImageStreaming() bool { + if x != nil { + return x.EnableImageStreaming + } + return false +} + +// Script runnable. +type Runnable_Script struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Command: + // + // *Runnable_Script_Path + // *Runnable_Script_Text + Command isRunnable_Script_Command `protobuf_oneof:"command"` +} + +func (x *Runnable_Script) Reset() { + *x = Runnable_Script{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Runnable_Script) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Runnable_Script) ProtoMessage() {} + +func (x *Runnable_Script) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Runnable_Script.ProtoReflect.Descriptor instead. +func (*Runnable_Script) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{4, 1} +} + +func (m *Runnable_Script) GetCommand() isRunnable_Script_Command { + if m != nil { + return m.Command + } + return nil +} + +func (x *Runnable_Script) GetPath() string { + if x, ok := x.GetCommand().(*Runnable_Script_Path); ok { + return x.Path + } + return "" +} + +func (x *Runnable_Script) GetText() string { + if x, ok := x.GetCommand().(*Runnable_Script_Text); ok { + return x.Text + } + return "" +} + +type isRunnable_Script_Command interface { + isRunnable_Script_Command() +} + +type Runnable_Script_Path struct { + // Script file path on the host VM. + // + // To specify an interpreter, please add a `#!<interpreter>`(also known as + // [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the + // first line of the file.(For example, to execute the script using bash, + // `#!/bin/bash` should be the first line of the file. To execute the + // script using`Python3`, `#!/usr/bin/env python3` should be the first + // line of the file.) Otherwise, the file will by default be executed by + // `/bin/sh`. + Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` +} + +type Runnable_Script_Text struct { + // Shell script text. + // + // To specify an interpreter, please add a `#!<interpreter>\n` at the + // beginning of the text.(For example, to execute the script using bash, + // `#!/bin/bash\n` should be added. To execute the script using`Python3`, + // `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will + // by default be executed by `/bin/sh`. + Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"` +} + +func (*Runnable_Script_Path) isRunnable_Script_Command() {} + +func (*Runnable_Script_Text) isRunnable_Script_Command() {} + +// Barrier runnable blocks until all tasks in a taskgroup reach it. +type Runnable_Barrier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Barriers are identified by their index in runnable list. + // Names are not required, but if present should be an identifier. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Runnable_Barrier) Reset() { + *x = Runnable_Barrier{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Runnable_Barrier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Runnable_Barrier) ProtoMessage() {} + +func (x *Runnable_Barrier) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Runnable_Barrier.ProtoReflect.Descriptor instead. +func (*Runnable_Barrier) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{4, 2} +} + +func (x *Runnable_Barrier) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Conditions for actions to deal with task failures. +type LifecyclePolicy_ActionCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Exit codes of a task execution. + // If there are more than 1 exit codes, + // when task executes with any of the exit code in the list, + // the condition is met and the action will be executed. + ExitCodes []int32 `protobuf:"varint,1,rep,packed,name=exit_codes,json=exitCodes,proto3" json:"exit_codes,omitempty"` +} + +func (x *LifecyclePolicy_ActionCondition) Reset() { + *x = LifecyclePolicy_ActionCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecyclePolicy_ActionCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecyclePolicy_ActionCondition) ProtoMessage() {} + +func (x *LifecyclePolicy_ActionCondition) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecyclePolicy_ActionCondition.ProtoReflect.Descriptor instead. +func (*LifecyclePolicy_ActionCondition) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *LifecyclePolicy_ActionCondition) GetExitCodes() []int32 { + if x != nil { + return x.ExitCodes + } + return nil +} + +type Environment_KMSEnvMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the KMS key that will be used to decrypt the cipher text. + KeyName string `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"` + // The value of the cipherText response from the `encrypt` method. + CipherText string `protobuf:"bytes,2,opt,name=cipher_text,json=cipherText,proto3" json:"cipher_text,omitempty"` +} + +func (x *Environment_KMSEnvMap) Reset() { + *x = Environment_KMSEnvMap{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment_KMSEnvMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment_KMSEnvMap) ProtoMessage() {} + +func (x *Environment_KMSEnvMap) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment_KMSEnvMap.ProtoReflect.Descriptor instead. +func (*Environment_KMSEnvMap) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_task_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *Environment_KMSEnvMap) GetKeyName() string { + if x != nil { + return x.KeyName + } + return "" +} + +func (x *Environment_KMSEnvMap) GetCipherText() string { + if x != nil { + return x.CipherText + } + return "" +} + +var File_google_cloud_batch_v1_task_proto protoreflect.FileDescriptor + +var file_google_cloud_batch_v1_task_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x63, 0x70, 0x75, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x69, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x69, 0x62, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x6f, 0x6f, + 0x74, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x69, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4d, 0x69, 0x62, 0x22, 0x93, 0x02, + 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4b, + 0x0a, 0x0e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x74, 0x61, + 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0a, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x22, 0x87, 0x02, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x47, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x71, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, + 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x55, + 0x4e, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x10, 0x06, 0x22, 0x9e, 0x08, 0x0a, 0x08, + 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x07, 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x78, 0x69, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x52, 0x75, 0x6e, 0x12, + 0x44, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, + 0xc1, 0x02, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, + 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x16, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x14, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x1a, 0x3f, 0x0a, 0x06, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x14, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x1a, 0x1d, 0x0a, 0x07, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0c, + 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xfb, 0x04, 0x0a, + 0x08, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x75, 0x6e, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x72, + 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x6d, + 0x61, 0x78, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x52, 0x75, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x52, 0x65, + 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x12, 0x6c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, + 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x11, 0x6c, 0x69, + 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, + 0x59, 0x0a, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x3f, 0x0a, 0x11, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xae, 0x02, 0x0a, 0x0f, 0x4c, + 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x45, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x30, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, + 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, + 0x09, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x06, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, + 0x52, 0x45, 0x54, 0x52, 0x59, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x46, 0x41, 0x49, 0x4c, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x02, 0x22, 0xce, 0x01, 0x0a, 0x04, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x3a, 0x77, 0xea, 0x41, 0x74, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x57, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, + 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x7d, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x7d, 0x22, 0xec, 0x03, 0x0a, + 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x09, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x62, 0x0a, + 0x10, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x5d, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x4b, 0x4d, 0x53, 0x45, 0x6e, 0x76, 0x4d, 0x61, 0x70, 0x52, 0x12, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x1a, 0x47, 0x0a, 0x09, 0x4b, 0x4d, 0x53, 0x45, 0x6e, 0x76, 0x4d, 0x61, 0x70, 0x12, 0x19, 0x0a, + 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x69, 0x70, 0x68, + 0x65, 0x72, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x65, 0x78, 0x74, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xaa, 0x01, 0x0a, 0x19, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x70, 0x62, 0x3b, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x47, 0x43, 0x42, 0xaa, 0x02, 0x15, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x18, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_batch_v1_task_proto_rawDescOnce sync.Once + file_google_cloud_batch_v1_task_proto_rawDescData = file_google_cloud_batch_v1_task_proto_rawDesc +) + +func file_google_cloud_batch_v1_task_proto_rawDescGZIP() []byte { + file_google_cloud_batch_v1_task_proto_rawDescOnce.Do(func() { + file_google_cloud_batch_v1_task_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_batch_v1_task_proto_rawDescData) + }) + return file_google_cloud_batch_v1_task_proto_rawDescData +} + +var file_google_cloud_batch_v1_task_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_batch_v1_task_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_google_cloud_batch_v1_task_proto_goTypes = []interface{}{ + (TaskStatus_State)(0), // 0: google.cloud.batch.v1.TaskStatus.State + (LifecyclePolicy_Action)(0), // 1: google.cloud.batch.v1.LifecyclePolicy.Action + (*ComputeResource)(nil), // 2: google.cloud.batch.v1.ComputeResource + (*StatusEvent)(nil), // 3: google.cloud.batch.v1.StatusEvent + (*TaskExecution)(nil), // 4: google.cloud.batch.v1.TaskExecution + (*TaskStatus)(nil), // 5: google.cloud.batch.v1.TaskStatus + (*Runnable)(nil), // 6: google.cloud.batch.v1.Runnable + (*TaskSpec)(nil), // 7: google.cloud.batch.v1.TaskSpec + (*LifecyclePolicy)(nil), // 8: google.cloud.batch.v1.LifecyclePolicy + (*Task)(nil), // 9: google.cloud.batch.v1.Task + (*Environment)(nil), // 10: google.cloud.batch.v1.Environment + (*Runnable_Container)(nil), // 11: google.cloud.batch.v1.Runnable.Container + (*Runnable_Script)(nil), // 12: google.cloud.batch.v1.Runnable.Script + (*Runnable_Barrier)(nil), // 13: google.cloud.batch.v1.Runnable.Barrier + nil, // 14: google.cloud.batch.v1.Runnable.LabelsEntry + nil, // 15: google.cloud.batch.v1.TaskSpec.EnvironmentsEntry + (*LifecyclePolicy_ActionCondition)(nil), // 16: google.cloud.batch.v1.LifecyclePolicy.ActionCondition + (*Environment_KMSEnvMap)(nil), // 17: google.cloud.batch.v1.Environment.KMSEnvMap + nil, // 18: google.cloud.batch.v1.Environment.VariablesEntry + nil, // 19: google.cloud.batch.v1.Environment.SecretVariablesEntry + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 21: google.protobuf.Duration + (*Volume)(nil), // 22: google.cloud.batch.v1.Volume +} +var file_google_cloud_batch_v1_task_proto_depIdxs = []int32{ + 20, // 0: google.cloud.batch.v1.StatusEvent.event_time:type_name -> google.protobuf.Timestamp + 4, // 1: google.cloud.batch.v1.StatusEvent.task_execution:type_name -> google.cloud.batch.v1.TaskExecution + 0, // 2: google.cloud.batch.v1.StatusEvent.task_state:type_name -> google.cloud.batch.v1.TaskStatus.State + 0, // 3: google.cloud.batch.v1.TaskStatus.state:type_name -> google.cloud.batch.v1.TaskStatus.State + 3, // 4: google.cloud.batch.v1.TaskStatus.status_events:type_name -> google.cloud.batch.v1.StatusEvent + 11, // 5: google.cloud.batch.v1.Runnable.container:type_name -> google.cloud.batch.v1.Runnable.Container + 12, // 6: google.cloud.batch.v1.Runnable.script:type_name -> google.cloud.batch.v1.Runnable.Script + 13, // 7: google.cloud.batch.v1.Runnable.barrier:type_name -> google.cloud.batch.v1.Runnable.Barrier + 10, // 8: google.cloud.batch.v1.Runnable.environment:type_name -> google.cloud.batch.v1.Environment + 21, // 9: google.cloud.batch.v1.Runnable.timeout:type_name -> google.protobuf.Duration + 14, // 10: google.cloud.batch.v1.Runnable.labels:type_name -> google.cloud.batch.v1.Runnable.LabelsEntry + 6, // 11: google.cloud.batch.v1.TaskSpec.runnables:type_name -> google.cloud.batch.v1.Runnable + 2, // 12: google.cloud.batch.v1.TaskSpec.compute_resource:type_name -> google.cloud.batch.v1.ComputeResource + 21, // 13: google.cloud.batch.v1.TaskSpec.max_run_duration:type_name -> google.protobuf.Duration + 8, // 14: google.cloud.batch.v1.TaskSpec.lifecycle_policies:type_name -> google.cloud.batch.v1.LifecyclePolicy + 15, // 15: google.cloud.batch.v1.TaskSpec.environments:type_name -> google.cloud.batch.v1.TaskSpec.EnvironmentsEntry + 22, // 16: google.cloud.batch.v1.TaskSpec.volumes:type_name -> google.cloud.batch.v1.Volume + 10, // 17: google.cloud.batch.v1.TaskSpec.environment:type_name -> google.cloud.batch.v1.Environment + 1, // 18: google.cloud.batch.v1.LifecyclePolicy.action:type_name -> google.cloud.batch.v1.LifecyclePolicy.Action + 16, // 19: google.cloud.batch.v1.LifecyclePolicy.action_condition:type_name -> google.cloud.batch.v1.LifecyclePolicy.ActionCondition + 5, // 20: google.cloud.batch.v1.Task.status:type_name -> google.cloud.batch.v1.TaskStatus + 18, // 21: google.cloud.batch.v1.Environment.variables:type_name -> google.cloud.batch.v1.Environment.VariablesEntry + 19, // 22: google.cloud.batch.v1.Environment.secret_variables:type_name -> google.cloud.batch.v1.Environment.SecretVariablesEntry + 17, // 23: google.cloud.batch.v1.Environment.encrypted_variables:type_name -> google.cloud.batch.v1.Environment.KMSEnvMap + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name +} + +func init() { file_google_cloud_batch_v1_task_proto_init() } +func file_google_cloud_batch_v1_task_proto_init() { + if File_google_cloud_batch_v1_task_proto != nil { + return + } + file_google_cloud_batch_v1_volume_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_batch_v1_task_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComputeResource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatusEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskExecution); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Runnable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifecyclePolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Task); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Environment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Runnable_Container); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Runnable_Script); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Runnable_Barrier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifecyclePolicy_ActionCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Environment_KMSEnvMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_batch_v1_task_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*Runnable_Container_)(nil), + (*Runnable_Script_)(nil), + (*Runnable_Barrier_)(nil), + } + file_google_cloud_batch_v1_task_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*Runnable_Script_Path)(nil), + (*Runnable_Script_Text)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_batch_v1_task_proto_rawDesc, + NumEnums: 2, + NumMessages: 18, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_batch_v1_task_proto_goTypes, + DependencyIndexes: file_google_cloud_batch_v1_task_proto_depIdxs, + EnumInfos: file_google_cloud_batch_v1_task_proto_enumTypes, + MessageInfos: file_google_cloud_batch_v1_task_proto_msgTypes, + }.Build() + File_google_cloud_batch_v1_task_proto = out.File + file_google_cloud_batch_v1_task_proto_rawDesc = nil + file_google_cloud_batch_v1_task_proto_goTypes = nil + file_google_cloud_batch_v1_task_proto_depIdxs = nil +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/batchpb/volume.pb.go b/vendor/cloud.google.com/go/batch/apiv1/batchpb/volume.pb.go new file mode 100644 index 000000000..6ae9cf805 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/batchpb/volume.pb.go @@ -0,0 +1,413 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.2 +// source: google/cloud/batch/v1/volume.proto + +package batchpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Volume describes a volume and parameters for it to be mounted to a VM. +type Volume struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source for the volume. + // + // Types that are assignable to Source: + // + // *Volume_Nfs + // *Volume_Gcs + // *Volume_DeviceName + Source isVolume_Source `protobuf_oneof:"source"` + // The mount path for the volume, e.g. /mnt/disks/share. + MountPath string `protobuf:"bytes,4,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` + // For Google Cloud Storage (GCS), mount options are the options supported by + // the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). + // For existing persistent disks, mount options provided by the + // mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except + // writing are supported. This is due to restrictions of multi-writer mode + // (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + // For other attached disks and Network File System (NFS), mount options are + // these supported by the mount command + // (https://man7.org/linux/man-pages/man8/mount.8.html). + MountOptions []string `protobuf:"bytes,5,rep,name=mount_options,json=mountOptions,proto3" json:"mount_options,omitempty"` +} + +func (x *Volume) Reset() { + *x = Volume{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Volume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Volume) ProtoMessage() {} + +func (x *Volume) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Volume.ProtoReflect.Descriptor instead. +func (*Volume) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_volume_proto_rawDescGZIP(), []int{0} +} + +func (m *Volume) GetSource() isVolume_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *Volume) GetNfs() *NFS { + if x, ok := x.GetSource().(*Volume_Nfs); ok { + return x.Nfs + } + return nil +} + +func (x *Volume) GetGcs() *GCS { + if x, ok := x.GetSource().(*Volume_Gcs); ok { + return x.Gcs + } + return nil +} + +func (x *Volume) GetDeviceName() string { + if x, ok := x.GetSource().(*Volume_DeviceName); ok { + return x.DeviceName + } + return "" +} + +func (x *Volume) GetMountPath() string { + if x != nil { + return x.MountPath + } + return "" +} + +func (x *Volume) GetMountOptions() []string { + if x != nil { + return x.MountOptions + } + return nil +} + +type isVolume_Source interface { + isVolume_Source() +} + +type Volume_Nfs struct { + // A Network File System (NFS) volume. For example, a + // Filestore file share. + Nfs *NFS `protobuf:"bytes,1,opt,name=nfs,proto3,oneof"` +} + +type Volume_Gcs struct { + // A Google Cloud Storage (GCS) volume. + Gcs *GCS `protobuf:"bytes,3,opt,name=gcs,proto3,oneof"` +} + +type Volume_DeviceName struct { + // Device name of an attached disk volume, which should align with a + // device_name specified by + // job.allocation_policy.instances[0].policy.disks[i].device_name or + // defined by the given instance template in + // job.allocation_policy.instances[0].instance_template. + DeviceName string `protobuf:"bytes,6,opt,name=device_name,json=deviceName,proto3,oneof"` +} + +func (*Volume_Nfs) isVolume_Source() {} + +func (*Volume_Gcs) isVolume_Source() {} + +func (*Volume_DeviceName) isVolume_Source() {} + +// Represents an NFS volume. +type NFS struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The IP address of the NFS. + Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` + // Remote source path exported from the NFS, e.g., "/share". + RemotePath string `protobuf:"bytes,2,opt,name=remote_path,json=remotePath,proto3" json:"remote_path,omitempty"` +} + +func (x *NFS) Reset() { + *x = NFS{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NFS) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NFS) ProtoMessage() {} + +func (x *NFS) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NFS.ProtoReflect.Descriptor instead. +func (*NFS) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_volume_proto_rawDescGZIP(), []int{1} +} + +func (x *NFS) GetServer() string { + if x != nil { + return x.Server + } + return "" +} + +func (x *NFS) GetRemotePath() string { + if x != nil { + return x.RemotePath + } + return "" +} + +// Represents a Google Cloud Storage volume. +type GCS struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Remote path, either a bucket name or a subdirectory of a bucket, e.g.: + // bucket_name, bucket_name/subdirectory/ + RemotePath string `protobuf:"bytes,1,opt,name=remote_path,json=remotePath,proto3" json:"remote_path,omitempty"` +} + +func (x *GCS) Reset() { + *x = GCS{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GCS) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GCS) ProtoMessage() {} + +func (x *GCS) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GCS.ProtoReflect.Descriptor instead. +func (*GCS) Descriptor() ([]byte, []int) { + return file_google_cloud_batch_v1_volume_proto_rawDescGZIP(), []int{2} +} + +func (x *GCS) GetRemotePath() string { + if x != nil { + return x.RemotePath + } + return "" +} + +var File_google_cloud_batch_v1_volume_proto protoreflect.FileDescriptor + +var file_google_cloud_batch_v1_volume_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x22, 0xd9, 0x01, 0x0a, 0x06, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x03, 0x6e, 0x66, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x46, 0x53, 0x48, + 0x00, 0x52, 0x03, 0x6e, 0x66, 0x73, 0x12, 0x2e, 0x0a, 0x03, 0x67, 0x63, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x43, 0x53, 0x48, + 0x00, 0x52, 0x03, 0x67, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3e, 0x0a, 0x03, 0x4e, 0x46, 0x53, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x26, 0x0a, 0x03, 0x47, 0x43, 0x53, 0x12, 0x1f, + 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x42, + 0xac, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, + 0x6f, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x70, 0x62, 0x3b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x70, 0x62, 0xa2, 0x02, 0x03, + 0x47, 0x43, 0x42, 0xaa, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x5c, 0x56, 0x31, 0xea, 0x02, 0x18, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_batch_v1_volume_proto_rawDescOnce sync.Once + file_google_cloud_batch_v1_volume_proto_rawDescData = file_google_cloud_batch_v1_volume_proto_rawDesc +) + +func file_google_cloud_batch_v1_volume_proto_rawDescGZIP() []byte { + file_google_cloud_batch_v1_volume_proto_rawDescOnce.Do(func() { + file_google_cloud_batch_v1_volume_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_batch_v1_volume_proto_rawDescData) + }) + return file_google_cloud_batch_v1_volume_proto_rawDescData +} + +var file_google_cloud_batch_v1_volume_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_cloud_batch_v1_volume_proto_goTypes = []interface{}{ + (*Volume)(nil), // 0: google.cloud.batch.v1.Volume + (*NFS)(nil), // 1: google.cloud.batch.v1.NFS + (*GCS)(nil), // 2: google.cloud.batch.v1.GCS +} +var file_google_cloud_batch_v1_volume_proto_depIdxs = []int32{ + 1, // 0: google.cloud.batch.v1.Volume.nfs:type_name -> google.cloud.batch.v1.NFS + 2, // 1: google.cloud.batch.v1.Volume.gcs:type_name -> google.cloud.batch.v1.GCS + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_batch_v1_volume_proto_init() } +func file_google_cloud_batch_v1_volume_proto_init() { + if File_google_cloud_batch_v1_volume_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_batch_v1_volume_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Volume); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_volume_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NFS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_batch_v1_volume_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GCS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_batch_v1_volume_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Volume_Nfs)(nil), + (*Volume_Gcs)(nil), + (*Volume_DeviceName)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_batch_v1_volume_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_batch_v1_volume_proto_goTypes, + DependencyIndexes: file_google_cloud_batch_v1_volume_proto_depIdxs, + MessageInfos: file_google_cloud_batch_v1_volume_proto_msgTypes, + }.Build() + File_google_cloud_batch_v1_volume_proto = out.File + file_google_cloud_batch_v1_volume_proto_rawDesc = nil + file_google_cloud_batch_v1_volume_proto_goTypes = nil + file_google_cloud_batch_v1_volume_proto_depIdxs = nil +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/doc.go b/vendor/cloud.google.com/go/batch/apiv1/doc.go new file mode 100644 index 000000000..a6503ef20 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/doc.go @@ -0,0 +1,121 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package batch is an auto-generated package for the +// Batch API. +// +// An API to manage the running of batch resources on Google Cloud Platform. +// +// # General documentation +// +// For information that is relevant for all client libraries please reference +// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this +// page includes: +// +// - [Authentication and Authorization] +// - [Timeouts and Cancellation] +// - [Testing against Client Libraries] +// - [Debugging Client Libraries] +// - [Inspecting errors] +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := batch.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := batch.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &batchpb.CreateJobRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/cloud.google.com/go/batch/apiv1/batchpb#CreateJobRequest. +// } +// resp, err := c.CreateJob(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization +// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation +// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing +// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging +// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors +package batch // import "cloud.google.com/go/batch/apiv1" + +import ( + "context" + + "google.golang.org/api/option" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/gapic_metadata.json b/vendor/cloud.google.com/go/batch/apiv1/gapic_metadata.json new file mode 100644 index 000000000..5b848464f --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/gapic_metadata.json @@ -0,0 +1,143 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.batch.v1", + "libraryPackage": "cloud.google.com/go/batch/apiv1", + "services": { + "BatchService": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateJob": { + "methods": [ + "CreateJob" + ] + }, + "DeleteJob": { + "methods": [ + "DeleteJob" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetJob": { + "methods": [ + "GetJob" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetTask": { + "methods": [ + "GetTask" + ] + }, + "ListJobs": { + "methods": [ + "ListJobs" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListTasks": { + "methods": [ + "ListTasks" + ] + } + } + }, + "rest": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateJob": { + "methods": [ + "CreateJob" + ] + }, + "DeleteJob": { + "methods": [ + "DeleteJob" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetJob": { + "methods": [ + "GetJob" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetTask": { + "methods": [ + "GetTask" + ] + }, + "ListJobs": { + "methods": [ + "ListJobs" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListTasks": { + "methods": [ + "ListTasks" + ] + } + } + } + } + } + } +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/iam_policy_client.go b/vendor/cloud.google.com/go/batch/apiv1/iam_policy_client.go new file mode 100644 index 000000000..818a305e9 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/iam_policy_client.go @@ -0,0 +1,1225 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. +// +// Note: Generation has ceased. New GAPIC changes may need to be manually +// backported. + +package batch + +import ( + "bytes" + "context" + "fmt" + "io" + "math" + "net/http" + "net/url" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newIamPolicyClientHook clientHook + +// IamPolicyCallOptions contains the retry settings for each method of IamPolicyClient. +type IamPolicyCallOptions struct { + SetIamPolicy []gax.CallOption + GetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultIamPolicyGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("iam-meta-api.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("iam-meta-api.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://iam-meta-api.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultIamPolicyCallOptions() *IamPolicyCallOptions { + return &IamPolicyCallOptions{ + SetIamPolicy: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultIamPolicyRESTCallOptions() *IamPolicyCallOptions { + return &IamPolicyCallOptions{ + SetIamPolicy: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalIamPolicyClient is an interface that defines the methods available from Batch API. +type internalIamPolicyClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// IamPolicyClient is a client for interacting with Batch API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// # API Overview +// +// Manages Identity and Access Management (IAM) policies. +// +// Any implementation of an API that offers access control features +// implements the google.iam.v1.IAMPolicy interface. +// +// Data modelAccess control is applied when a principal (user or service account), takes +// some action on a resource exposed by a service. Resources, identified by +// URI-like names, are the unit of access control specification. Service +// implementations can choose the granularity of access control and the +// supported permissions for their resources. +// For example one database service may allow access control to be +// specified only at the Table level, whereas another might allow access control +// to also be specified at the Column level. +// +// # Policy StructureSee google.iam.v1.Policy +// +// This is intentionally not a CRUD style API because access control policies +// are created and deleted implicitly with the resources to which they are +// attached. +type IamPolicyClient struct { + // The internal transport-dependent client. + internalClient internalIamPolicyClient + + // The call options for this service. + CallOptions *IamPolicyCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *IamPolicyClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *IamPolicyClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *IamPolicyClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces any +// existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. +func (c *IamPolicyClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. +// Returns an empty policy if the resource exists and does not have a policy +// set. +func (c *IamPolicyClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. +// If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building permission-aware +// UIs and command-line tools, not for authorization checking. This operation +// may “fail open” without warning. +func (c *IamPolicyClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *IamPolicyClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *IamPolicyClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *IamPolicyClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *IamPolicyClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *IamPolicyClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *IamPolicyClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// iamPolicyGRPCClient is a client for interacting with Batch API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type iamPolicyGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing IamPolicyClient + CallOptions **IamPolicyCallOptions + + // The gRPC API client. + iamPolicyClient iampb.IAMPolicyClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewIamPolicyClient creates a new iam policy client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// # API Overview +// +// Manages Identity and Access Management (IAM) policies. +// +// Any implementation of an API that offers access control features +// implements the google.iam.v1.IAMPolicy interface. +// +// Data modelAccess control is applied when a principal (user or service account), takes +// some action on a resource exposed by a service. Resources, identified by +// URI-like names, are the unit of access control specification. Service +// implementations can choose the granularity of access control and the +// supported permissions for their resources. +// For example one database service may allow access control to be +// specified only at the Table level, whereas another might allow access control +// to also be specified at the Column level. +// +// # Policy StructureSee google.iam.v1.Policy +// +// This is intentionally not a CRUD style API because access control policies +// are created and deleted implicitly with the resources to which they are +// attached. +func NewIamPolicyClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error) { + clientOpts := defaultIamPolicyGRPCClientOptions() + if newIamPolicyClientHook != nil { + hookOpts, err := newIamPolicyClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := IamPolicyClient{CallOptions: defaultIamPolicyCallOptions()} + + c := &iamPolicyGRPCClient{ + connPool: connPool, + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *iamPolicyGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *iamPolicyGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *iamPolicyGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type iamPolicyRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing IamPolicyClient + CallOptions **IamPolicyCallOptions +} + +// NewIamPolicyRESTClient creates a new iam policy rest client. +// +// # API Overview +// +// Manages Identity and Access Management (IAM) policies. +// +// Any implementation of an API that offers access control features +// implements the google.iam.v1.IAMPolicy interface. +// +// Data modelAccess control is applied when a principal (user or service account), takes +// some action on a resource exposed by a service. Resources, identified by +// URI-like names, are the unit of access control specification. Service +// implementations can choose the granularity of access control and the +// supported permissions for their resources. +// For example one database service may allow access control to be +// specified only at the Table level, whereas another might allow access control +// to also be specified at the Column level. +// +// # Policy StructureSee google.iam.v1.Policy +// +// This is intentionally not a CRUD style API because access control policies +// are created and deleted implicitly with the resources to which they are +// attached. +func NewIamPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error) { + clientOpts := append(defaultIamPolicyRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultIamPolicyRESTCallOptions() + c := &iamPolicyRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &IamPolicyClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultIamPolicyRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://iam-meta-api.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://iam-meta-api.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://iam-meta-api.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *iamPolicyRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *iamPolicyRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *iamPolicyRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *iamPolicyGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *iamPolicyGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *iamPolicyGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *iamPolicyGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *iamPolicyGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *iamPolicyGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *iamPolicyGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *iamPolicyGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *iamPolicyGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces any +// existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. +func (c *iamPolicyRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:setIamPolicy", req.GetResource()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetIamPolicy gets the access control policy for a resource. +// Returns an empty policy if the resource exists and does not have a policy +// set. +func (c *iamPolicyRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:getIamPolicy", req.GetResource()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. +// If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building permission-aware +// UIs and command-line tools, not for authorization checking. This operation +// may “fail open” without warning. +func (c *iamPolicyRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:testIamPermissions", req.GetResource()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *iamPolicyRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *iamPolicyRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *iamPolicyRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:cancel", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *iamPolicyRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *iamPolicyRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *iamPolicyRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/operations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/vendor/cloud.google.com/go/batch/apiv1/version.go b/vendor/cloud.google.com/go/batch/apiv1/version.go new file mode 100644 index 000000000..d55e81275 --- /dev/null +++ b/vendor/cloud.google.com/go/batch/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package batch + +import "cloud.google.com/go/batch/internal" + +func init() { + versionClient = internal.Version +} diff --git a/vendor/cloud.google.com/go/batch/internal/version.go b/vendor/cloud.google.com/go/batch/internal/version.go new file mode 100644 index 000000000..333992a0c --- /dev/null +++ b/vendor/cloud.google.com/go/batch/internal/version.go @@ -0,0 +1,20 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package internal + +// Version is the current tagged release of the library. +const Version = "1.8.3" diff --git a/vendor/modules.txt b/vendor/modules.txt index 80ab0a941..ccffd4ca2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -41,6 +41,11 @@ cloud.google.com/go/auth/internal/transport/cert # cloud.google.com/go/auth/oauth2adapt v0.2.2 ## explicit; go 1.19 cloud.google.com/go/auth/oauth2adapt +# cloud.google.com/go/batch v1.8.3 +## explicit; go 1.19 +cloud.google.com/go/batch/apiv1 +cloud.google.com/go/batch/apiv1/batchpb +cloud.google.com/go/batch/internal # cloud.google.com/go/bigquery v1.60.0 ## explicit; go 1.19 cloud.google.com/go/bigquery |
