build(deps): bump the go-deps group with 10 updates
Bumps the go-deps group with 10 updates: | Package | From | To | | --- | --- | --- | | [cloud.google.com/go/compute](https://github.com/googleapis/google-cloud-go) | `1.23.3` | `1.23.4` | | [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) | `1.36.0` | `1.37.0` | | [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) | `1.4.0` | `1.5.1` | | [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5](https://github.com/Azure/azure-sdk-for-go) | `5.3.0` | `5.5.0` | | [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.50.0` | `1.50.8` | | [github.com/google/uuid](https://github.com/google/uuid) | `1.5.0` | `1.6.0` | | [github.com/jackc/pgtype](https://github.com/jackc/pgtype) | `1.14.0` | `1.14.1` | | [github.com/openshift-online/ocm-sdk-go](https://github.com/openshift-online/ocm-sdk-go) | `0.1.390` | `0.1.398` | | [github.com/osbuild/images](https://github.com/osbuild/images) | `0.33.0` | `0.34.0` | | [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.160.0` | `0.161.0` | Updates `cloud.google.com/go/compute` from 1.23.3 to 1.23.4 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/compute/v1.23.3...compute/v1.23.4) Updates `cloud.google.com/go/storage` from 1.36.0 to 1.37.0 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.36.0...spanner/v1.37.0) Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.4.0 to 1.5.1 - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.4.0...sdk/internal/v1.5.1) Updates `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5` from 5.3.0 to 5.5.0 - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/resourcemanager/compute/armcompute/v5.3.0...sdk/resourcemanager/compute/armcompute/v5.5.0) Updates `github.com/aws/aws-sdk-go` from 1.50.0 to 1.50.8 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.50.0...v1.50.8) Updates `github.com/google/uuid` from 1.5.0 to 1.6.0 - [Release notes](https://github.com/google/uuid/releases) - [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) Updates `github.com/jackc/pgtype` from 1.14.0 to 1.14.1 - [Changelog](https://github.com/jackc/pgtype/blob/master/CHANGELOG.md) - [Commits](https://github.com/jackc/pgtype/compare/v1.14.0...v1.14.1) Updates `github.com/openshift-online/ocm-sdk-go` from 0.1.390 to 0.1.398 - [Release notes](https://github.com/openshift-online/ocm-sdk-go/releases) - [Changelog](https://github.com/openshift-online/ocm-sdk-go/blob/main/CHANGES.md) - [Commits](https://github.com/openshift-online/ocm-sdk-go/compare/v0.1.390...v0.1.398) Updates `github.com/osbuild/images` from 0.33.0 to 0.34.0 - [Release notes](https://github.com/osbuild/images/releases) - [Commits](https://github.com/osbuild/images/compare/v0.33.0...v0.34.0) Updates `google.golang.org/api` from 0.160.0 to 0.161.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.160.0...v0.161.0) --- updated-dependencies: - dependency-name: cloud.google.com/go/compute dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: cloud.google.com/go/storage dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/google/uuid dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/jackc/pgtype dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/openshift-online/ocm-sdk-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/osbuild/images dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
db0e6c9643
commit
b461b1faf3
306 changed files with 80393 additions and 56486 deletions
107
vendor/cloud.google.com/go/compute/apiv1/accelerator_types_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/accelerator_types_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -191,7 +191,9 @@ func NewAcceleratorTypesRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultAcceleratorTypesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -261,6 +263,9 @@ func (c *acceleratorTypesRESTClient) AggregatedList(ctx context.Context, req *co
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -479,103 +484,3 @@ func (c *acceleratorTypesRESTClient) List(ctx context.Context, req *computepb.Li
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// AcceleratorTypeIterator manages a stream of *computepb.AcceleratorType.
|
||||
type AcceleratorTypeIterator struct {
|
||||
items []*computepb.AcceleratorType
|
||||
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 []*computepb.AcceleratorType, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *AcceleratorTypeIterator) 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 *AcceleratorTypeIterator) Next() (*computepb.AcceleratorType, error) {
|
||||
var item *computepb.AcceleratorType
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *AcceleratorTypeIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *AcceleratorTypeIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// AcceleratorTypesScopedListPair is a holder type for string/*computepb.AcceleratorTypesScopedList map entries
|
||||
type AcceleratorTypesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.AcceleratorTypesScopedList
|
||||
}
|
||||
|
||||
// AcceleratorTypesScopedListPairIterator manages a stream of AcceleratorTypesScopedListPair.
|
||||
type AcceleratorTypesScopedListPairIterator struct {
|
||||
items []AcceleratorTypesScopedListPair
|
||||
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 []AcceleratorTypesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *AcceleratorTypesScopedListPairIterator) 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 *AcceleratorTypesScopedListPairIterator) Next() (AcceleratorTypesScopedListPair, error) {
|
||||
var item AcceleratorTypesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *AcceleratorTypesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *AcceleratorTypesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/addresses_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/addresses_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -241,7 +241,9 @@ func NewAddressesRESTClient(ctx context.Context, opts ...option.ClientOption) (*
|
|||
func defaultAddressesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -314,6 +316,9 @@ func (c *addressesRESTClient) AggregatedList(ctx context.Context, req *computepb
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -833,103 +838,3 @@ func (c *addressesRESTClient) SetLabels(ctx context.Context, req *computepb.SetL
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// AddressIterator manages a stream of *computepb.Address.
|
||||
type AddressIterator struct {
|
||||
items []*computepb.Address
|
||||
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 []*computepb.Address, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *AddressIterator) 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 *AddressIterator) Next() (*computepb.Address, error) {
|
||||
var item *computepb.Address
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *AddressIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *AddressIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// AddressesScopedListPair is a holder type for string/*computepb.AddressesScopedList map entries
|
||||
type AddressesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.AddressesScopedList
|
||||
}
|
||||
|
||||
// AddressesScopedListPairIterator manages a stream of AddressesScopedListPair.
|
||||
type AddressesScopedListPairIterator struct {
|
||||
items []AddressesScopedListPair
|
||||
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 []AddressesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *AddressesScopedListPairIterator) 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 *AddressesScopedListPairIterator) Next() (AddressesScopedListPair, error) {
|
||||
var item AddressesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *AddressesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *AddressesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/autoscalers_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/autoscalers_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -241,7 +241,9 @@ func NewAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultAutoscalersRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -314,6 +316,9 @@ func (c *autoscalersRESTClient) AggregatedList(ctx context.Context, req *compute
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -839,103 +844,3 @@ func (c *autoscalersRESTClient) Update(ctx context.Context, req *computepb.Updat
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// AutoscalerIterator manages a stream of *computepb.Autoscaler.
|
||||
type AutoscalerIterator struct {
|
||||
items []*computepb.Autoscaler
|
||||
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 []*computepb.Autoscaler, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *AutoscalerIterator) 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 *AutoscalerIterator) Next() (*computepb.Autoscaler, error) {
|
||||
var item *computepb.Autoscaler
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *AutoscalerIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *AutoscalerIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// AutoscalersScopedListPair is a holder type for string/*computepb.AutoscalersScopedList map entries
|
||||
type AutoscalersScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.AutoscalersScopedList
|
||||
}
|
||||
|
||||
// AutoscalersScopedListPairIterator manages a stream of AutoscalersScopedListPair.
|
||||
type AutoscalersScopedListPairIterator struct {
|
||||
items []AutoscalersScopedListPair
|
||||
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 []AutoscalersScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *AutoscalersScopedListPairIterator) 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 *AutoscalersScopedListPairIterator) Next() (AutoscalersScopedListPair, error) {
|
||||
var item AutoscalersScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *AutoscalersScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *AutoscalersScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
5579
vendor/cloud.google.com/go/compute/apiv1/auxiliary.go
generated
vendored
Normal file
5579
vendor/cloud.google.com/go/compute/apiv1/auxiliary.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
276
vendor/cloud.google.com/go/compute/apiv1/backend_buckets_client.go
generated
vendored
276
vendor/cloud.google.com/go/compute/apiv1/backend_buckets_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -46,10 +46,13 @@ type BackendBucketsCallOptions struct {
|
|||
Delete []gax.CallOption
|
||||
DeleteSignedUrlKey []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
GetIamPolicy []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
SetEdgeSecurityPolicy []gax.CallOption
|
||||
SetIamPolicy []gax.CallOption
|
||||
TestIamPermissions []gax.CallOption
|
||||
Update []gax.CallOption
|
||||
}
|
||||
|
||||
|
|
@ -76,6 +79,18 @@ func defaultBackendBucketsRESTCallOptions() *BackendBucketsCallOptions {
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
GetIamPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnHTTPCodes(gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.30,
|
||||
},
|
||||
http.StatusGatewayTimeout,
|
||||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Insert: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -97,6 +112,12 @@ func defaultBackendBucketsRESTCallOptions() *BackendBucketsCallOptions {
|
|||
SetEdgeSecurityPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
SetIamPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
TestIamPermissions: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Update: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -112,10 +133,13 @@ type internalBackendBucketsClient interface {
|
|||
Delete(context.Context, *computepb.DeleteBackendBucketRequest, ...gax.CallOption) (*Operation, error)
|
||||
DeleteSignedUrlKey(context.Context, *computepb.DeleteSignedUrlKeyBackendBucketRequest, ...gax.CallOption) (*Operation, error)
|
||||
Get(context.Context, *computepb.GetBackendBucketRequest, ...gax.CallOption) (*computepb.BackendBucket, error)
|
||||
GetIamPolicy(context.Context, *computepb.GetIamPolicyBackendBucketRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
Insert(context.Context, *computepb.InsertBackendBucketRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListBackendBucketsRequest, ...gax.CallOption) *BackendBucketIterator
|
||||
Patch(context.Context, *computepb.PatchBackendBucketRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetEdgeSecurityPolicy(context.Context, *computepb.SetEdgeSecurityPolicyBackendBucketRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetIamPolicy(context.Context, *computepb.SetIamPolicyBackendBucketRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
TestIamPermissions(context.Context, *computepb.TestIamPermissionsBackendBucketRequest, ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
|
||||
Update(context.Context, *computepb.UpdateBackendBucketRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
|
|
@ -174,6 +198,11 @@ func (c *BackendBucketsClient) Get(ctx context.Context, req *computepb.GetBacken
|
|||
return c.internalClient.Get(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
|
||||
func (c *BackendBucketsClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyBackendBucketRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
|
||||
return c.internalClient.GetIamPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Insert creates a BackendBucket resource in the specified project using the data included in the request.
|
||||
func (c *BackendBucketsClient) Insert(ctx context.Context, req *computepb.InsertBackendBucketRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Insert(ctx, req, opts...)
|
||||
|
|
@ -194,6 +223,16 @@ func (c *BackendBucketsClient) SetEdgeSecurityPolicy(ctx context.Context, req *c
|
|||
return c.internalClient.SetEdgeSecurityPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
|
||||
func (c *BackendBucketsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyBackendBucketRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
|
||||
return c.internalClient.SetIamPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// TestIamPermissions returns permissions that a caller has on the specified resource.
|
||||
func (c *BackendBucketsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsBackendBucketRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error) {
|
||||
return c.internalClient.TestIamPermissions(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Update updates the specified BackendBucket resource with the data included in the request.
|
||||
func (c *BackendBucketsClient) Update(ctx context.Context, req *computepb.UpdateBackendBucketRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Update(ctx, req, opts...)
|
||||
|
|
@ -251,7 +290,9 @@ func NewBackendBucketsRESTClient(ctx context.Context, opts ...option.ClientOptio
|
|||
func defaultBackendBucketsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -554,6 +595,68 @@ func (c *backendBucketsRESTClient) Get(ctx context.Context, req *computepb.GetBa
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
// GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
|
||||
func (c *backendBucketsRESTClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyBackendBucketRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/backendBuckets/%v/getIamPolicy", req.GetProject(), req.GetResource())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.OptionsRequestedPolicyVersion != nil {
|
||||
params.Add("optionsRequestedPolicyVersion", fmt.Sprintf("%v", req.GetOptionsRequestedPolicyVersion()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "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 := &computepb.Policy{}
|
||||
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
|
||||
}
|
||||
|
||||
// Insert creates a BackendBucket resource in the specified project using the data included in the request.
|
||||
func (c *backendBucketsRESTClient) Insert(ctx context.Context, req *computepb.InsertBackendBucketRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -879,6 +982,130 @@ func (c *backendBucketsRESTClient) SetEdgeSecurityPolicy(ctx context.Context, re
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
|
||||
func (c *backendBucketsRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyBackendBucketRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetGlobalSetPolicyRequestResource()
|
||||
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("/compute/v1/projects/%v/global/backendBuckets/%v/setIamPolicy", req.GetProject(), req.GetResource())
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "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 := &computepb.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.
|
||||
func (c *backendBucketsRESTClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsBackendBucketRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetTestPermissionsRequestResource()
|
||||
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("/compute/v1/projects/%v/global/backendBuckets/%v/testIamPermissions", req.GetProject(), req.GetResource())
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "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 := &computepb.TestPermissionsResponse{}
|
||||
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
|
||||
}
|
||||
|
||||
// Update updates the specified BackendBucket resource with the data included in the request.
|
||||
func (c *backendBucketsRESTClient) Update(ctx context.Context, req *computepb.UpdateBackendBucketRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -954,50 +1181,3 @@ func (c *backendBucketsRESTClient) Update(ctx context.Context, req *computepb.Up
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// BackendBucketIterator manages a stream of *computepb.BackendBucket.
|
||||
type BackendBucketIterator struct {
|
||||
items []*computepb.BackendBucket
|
||||
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 []*computepb.BackendBucket, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *BackendBucketIterator) 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 *BackendBucketIterator) Next() (*computepb.BackendBucket, error) {
|
||||
var item *computepb.BackendBucket
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *BackendBucketIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *BackendBucketIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
295
vendor/cloud.google.com/go/compute/apiv1/backend_services_client.go
generated
vendored
295
vendor/cloud.google.com/go/compute/apiv1/backend_services_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -52,10 +52,12 @@ type BackendServicesCallOptions struct {
|
|||
GetIamPolicy []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
ListUsable []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
SetEdgeSecurityPolicy []gax.CallOption
|
||||
SetIamPolicy []gax.CallOption
|
||||
SetSecurityPolicy []gax.CallOption
|
||||
TestIamPermissions []gax.CallOption
|
||||
Update []gax.CallOption
|
||||
}
|
||||
|
||||
|
|
@ -124,6 +126,18 @@ func defaultBackendServicesRESTCallOptions() *BackendServicesCallOptions {
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
ListUsable: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnHTTPCodes(gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.30,
|
||||
},
|
||||
http.StatusGatewayTimeout,
|
||||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Patch: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -136,6 +150,9 @@ func defaultBackendServicesRESTCallOptions() *BackendServicesCallOptions {
|
|||
SetSecurityPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
TestIamPermissions: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Update: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -156,10 +173,12 @@ type internalBackendServicesClient interface {
|
|||
GetIamPolicy(context.Context, *computepb.GetIamPolicyBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
Insert(context.Context, *computepb.InsertBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListBackendServicesRequest, ...gax.CallOption) *BackendServiceIterator
|
||||
ListUsable(context.Context, *computepb.ListUsableBackendServicesRequest, ...gax.CallOption) *BackendServiceIterator
|
||||
Patch(context.Context, *computepb.PatchBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetEdgeSecurityPolicy(context.Context, *computepb.SetEdgeSecurityPolicyBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetIamPolicy(context.Context, *computepb.SetIamPolicyBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
SetSecurityPolicy(context.Context, *computepb.SetSecurityPolicyBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
TestIamPermissions(context.Context, *computepb.TestIamPermissionsBackendServiceRequest, ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
|
||||
Update(context.Context, *computepb.UpdateBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
|
|
@ -243,6 +262,11 @@ func (c *BackendServicesClient) List(ctx context.Context, req *computepb.ListBac
|
|||
return c.internalClient.List(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// ListUsable retrieves an aggregated list of all usable backend services in the specified project.
|
||||
func (c *BackendServicesClient) ListUsable(ctx context.Context, req *computepb.ListUsableBackendServicesRequest, opts ...gax.CallOption) *BackendServiceIterator {
|
||||
return c.internalClient.ListUsable(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Patch patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
|
||||
func (c *BackendServicesClient) Patch(ctx context.Context, req *computepb.PatchBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Patch(ctx, req, opts...)
|
||||
|
|
@ -263,6 +287,11 @@ func (c *BackendServicesClient) SetSecurityPolicy(ctx context.Context, req *comp
|
|||
return c.internalClient.SetSecurityPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// TestIamPermissions returns permissions that a caller has on the specified resource.
|
||||
func (c *BackendServicesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsBackendServiceRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error) {
|
||||
return c.internalClient.TestIamPermissions(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Update updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
|
||||
func (c *BackendServicesClient) Update(ctx context.Context, req *computepb.UpdateBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Update(ctx, req, opts...)
|
||||
|
|
@ -320,7 +349,9 @@ func NewBackendServicesRESTClient(ctx context.Context, opts ...option.ClientOpti
|
|||
func defaultBackendServicesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -469,6 +500,9 @@ func (c *backendServicesRESTClient) AggregatedList(ctx context.Context, req *com
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1027,6 +1061,103 @@ func (c *backendServicesRESTClient) List(ctx context.Context, req *computepb.Lis
|
|||
return it
|
||||
}
|
||||
|
||||
// ListUsable retrieves an aggregated list of all usable backend services in the specified project.
|
||||
func (c *backendServicesRESTClient) ListUsable(ctx context.Context, req *computepb.ListUsableBackendServicesRequest, opts ...gax.CallOption) *BackendServiceIterator {
|
||||
it := &BackendServiceIterator{}
|
||||
req = proto.Clone(req).(*computepb.ListUsableBackendServicesRequest)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
it.InternalFetch = func(pageSize int, pageToken string) ([]*computepb.BackendService, string, error) {
|
||||
resp := &computepb.BackendServiceListUsable{}
|
||||
if pageToken != "" {
|
||||
req.PageToken = proto.String(pageToken)
|
||||
}
|
||||
if pageSize > math.MaxInt32 {
|
||||
req.MaxResults = proto.Uint32(math.MaxInt32)
|
||||
} else if pageSize != 0 {
|
||||
req.MaxResults = proto.Uint32(uint32(pageSize))
|
||||
}
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/backendServices/listUsable", req.GetProject())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.Filter != nil {
|
||||
params.Add("filter", fmt.Sprintf("%v", req.GetFilter()))
|
||||
}
|
||||
if req != nil && req.MaxResults != nil {
|
||||
params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults()))
|
||||
}
|
||||
if req != nil && req.OrderBy != nil {
|
||||
params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy()))
|
||||
}
|
||||
if req != nil && req.PageToken != nil {
|
||||
params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken()))
|
||||
}
|
||||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
|
||||
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.GetItems(), 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.GetMaxResults())
|
||||
it.pageInfo.Token = req.GetPageToken()
|
||||
|
||||
return it
|
||||
}
|
||||
|
||||
// Patch patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
|
||||
func (c *backendServicesRESTClient) Patch(ctx context.Context, req *computepb.PatchBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -1317,6 +1448,68 @@ func (c *backendServicesRESTClient) SetSecurityPolicy(ctx context.Context, req *
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// TestIamPermissions returns permissions that a caller has on the specified resource.
|
||||
func (c *backendServicesRESTClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsBackendServiceRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetTestPermissionsRequestResource()
|
||||
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("/compute/v1/projects/%v/global/backendServices/%v/testIamPermissions", req.GetProject(), req.GetResource())
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "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 := &computepb.TestPermissionsResponse{}
|
||||
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
|
||||
}
|
||||
|
||||
// Update updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
|
||||
func (c *backendServicesRESTClient) Update(ctx context.Context, req *computepb.UpdateBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -1392,103 +1585,3 @@ func (c *backendServicesRESTClient) Update(ctx context.Context, req *computepb.U
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// BackendServiceIterator manages a stream of *computepb.BackendService.
|
||||
type BackendServiceIterator struct {
|
||||
items []*computepb.BackendService
|
||||
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 []*computepb.BackendService, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *BackendServiceIterator) 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 *BackendServiceIterator) Next() (*computepb.BackendService, error) {
|
||||
var item *computepb.BackendService
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *BackendServiceIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *BackendServiceIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// BackendServicesScopedListPair is a holder type for string/*computepb.BackendServicesScopedList map entries
|
||||
type BackendServicesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.BackendServicesScopedList
|
||||
}
|
||||
|
||||
// BackendServicesScopedListPairIterator manages a stream of BackendServicesScopedListPair.
|
||||
type BackendServicesScopedListPairIterator struct {
|
||||
items []BackendServicesScopedListPair
|
||||
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 []BackendServicesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *BackendServicesScopedListPairIterator) 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 *BackendServicesScopedListPairIterator) Next() (BackendServicesScopedListPair, error) {
|
||||
var item BackendServicesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *BackendServicesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *BackendServicesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107662
vendor/cloud.google.com/go/compute/apiv1/computepb/compute.pb.go
generated
vendored
107662
vendor/cloud.google.com/go/compute/apiv1/computepb/compute.pb.go
generated
vendored
File diff suppressed because it is too large
Load diff
107
vendor/cloud.google.com/go/compute/apiv1/disk_types_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/disk_types_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -187,7 +187,9 @@ func NewDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*
|
|||
func defaultDiskTypesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -257,6 +259,9 @@ func (c *diskTypesRESTClient) AggregatedList(ctx context.Context, req *computepb
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -475,103 +480,3 @@ func (c *diskTypesRESTClient) List(ctx context.Context, req *computepb.ListDiskT
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// DiskTypeIterator manages a stream of *computepb.DiskType.
|
||||
type DiskTypeIterator struct {
|
||||
items []*computepb.DiskType
|
||||
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 []*computepb.DiskType, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *DiskTypeIterator) 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 *DiskTypeIterator) Next() (*computepb.DiskType, error) {
|
||||
var item *computepb.DiskType
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *DiskTypeIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *DiskTypeIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// DiskTypesScopedListPair is a holder type for string/*computepb.DiskTypesScopedList map entries
|
||||
type DiskTypesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.DiskTypesScopedList
|
||||
}
|
||||
|
||||
// DiskTypesScopedListPairIterator manages a stream of DiskTypesScopedListPair.
|
||||
type DiskTypesScopedListPairIterator struct {
|
||||
items []DiskTypesScopedListPair
|
||||
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 []DiskTypesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *DiskTypesScopedListPairIterator) 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 *DiskTypesScopedListPairIterator) Next() (DiskTypesScopedListPair, error) {
|
||||
var item DiskTypesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *DiskTypesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *DiskTypesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/disks_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/disks_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -360,7 +360,9 @@ func NewDisksRESTClient(ctx context.Context, opts ...option.ClientOption) (*Disk
|
|||
func defaultDisksRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -510,6 +512,9 @@ func (c *disksRESTClient) AggregatedList(ctx context.Context, req *computepb.Agg
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1759,103 +1764,3 @@ func (c *disksRESTClient) Update(ctx context.Context, req *computepb.UpdateDiskR
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// DiskIterator manages a stream of *computepb.Disk.
|
||||
type DiskIterator struct {
|
||||
items []*computepb.Disk
|
||||
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 []*computepb.Disk, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *DiskIterator) 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 *DiskIterator) Next() (*computepb.Disk, error) {
|
||||
var item *computepb.Disk
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *DiskIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *DiskIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// DisksScopedListPair is a holder type for string/*computepb.DisksScopedList map entries
|
||||
type DisksScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.DisksScopedList
|
||||
}
|
||||
|
||||
// DisksScopedListPairIterator manages a stream of DisksScopedListPair.
|
||||
type DisksScopedListPairIterator struct {
|
||||
items []DisksScopedListPair
|
||||
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 []DisksScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *DisksScopedListPairIterator) 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 *DisksScopedListPairIterator) Next() (DisksScopedListPair, error) {
|
||||
var item DisksScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *DisksScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *DisksScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
2
vendor/cloud.google.com/go/compute/apiv1/doc.go
generated
vendored
2
vendor/cloud.google.com/go/compute/apiv1/doc.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/external_vpn_gateways_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/external_vpn_gateways_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -221,7 +221,9 @@ func NewExternalVpnGatewaysRESTClient(ctx context.Context, opts ...option.Client
|
|||
func defaultExternalVpnGatewaysRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -681,50 +683,3 @@ func (c *externalVpnGatewaysRESTClient) TestIamPermissions(ctx context.Context,
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// ExternalVpnGatewayIterator manages a stream of *computepb.ExternalVpnGateway.
|
||||
type ExternalVpnGatewayIterator struct {
|
||||
items []*computepb.ExternalVpnGateway
|
||||
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 []*computepb.ExternalVpnGateway, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ExternalVpnGatewayIterator) 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 *ExternalVpnGatewayIterator) Next() (*computepb.ExternalVpnGateway, error) {
|
||||
var item *computepb.ExternalVpnGateway
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ExternalVpnGatewayIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ExternalVpnGatewayIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/firewall_policies_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/firewall_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -377,7 +377,9 @@ func NewFirewallPoliciesRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultFirewallPoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -1662,50 +1664,3 @@ func (c *firewallPoliciesRESTClient) TestIamPermissions(ctx context.Context, req
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// FirewallPolicyIterator manages a stream of *computepb.FirewallPolicy.
|
||||
type FirewallPolicyIterator struct {
|
||||
items []*computepb.FirewallPolicy
|
||||
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 []*computepb.FirewallPolicy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *FirewallPolicyIterator) 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 *FirewallPolicyIterator) Next() (*computepb.FirewallPolicy, error) {
|
||||
var item *computepb.FirewallPolicy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *FirewallPolicyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *FirewallPolicyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/firewalls_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/firewalls_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -221,7 +221,9 @@ func NewFirewallsRESTClient(ctx context.Context, opts ...option.ClientOption) (*
|
|||
func defaultFirewallsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -702,50 +704,3 @@ func (c *firewallsRESTClient) Update(ctx context.Context, req *computepb.UpdateF
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// FirewallIterator manages a stream of *computepb.Firewall.
|
||||
type FirewallIterator struct {
|
||||
items []*computepb.Firewall
|
||||
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 []*computepb.Firewall, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *FirewallIterator) 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 *FirewallIterator) Next() (*computepb.Firewall, error) {
|
||||
var item *computepb.Firewall
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *FirewallIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *FirewallIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/forwarding_rules_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/forwarding_rules_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -251,7 +251,9 @@ func NewForwardingRulesRESTClient(ctx context.Context, opts ...option.ClientOpti
|
|||
func defaultForwardingRulesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -324,6 +326,9 @@ func (c *forwardingRulesRESTClient) AggregatedList(ctx context.Context, req *com
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -920,103 +925,3 @@ func (c *forwardingRulesRESTClient) SetTarget(ctx context.Context, req *computep
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// ForwardingRuleIterator manages a stream of *computepb.ForwardingRule.
|
||||
type ForwardingRuleIterator struct {
|
||||
items []*computepb.ForwardingRule
|
||||
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 []*computepb.ForwardingRule, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ForwardingRuleIterator) 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 *ForwardingRuleIterator) Next() (*computepb.ForwardingRule, error) {
|
||||
var item *computepb.ForwardingRule
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ForwardingRuleIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ForwardingRuleIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// ForwardingRulesScopedListPair is a holder type for string/*computepb.ForwardingRulesScopedList map entries
|
||||
type ForwardingRulesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.ForwardingRulesScopedList
|
||||
}
|
||||
|
||||
// ForwardingRulesScopedListPairIterator manages a stream of ForwardingRulesScopedListPair.
|
||||
type ForwardingRulesScopedListPairIterator struct {
|
||||
items []ForwardingRulesScopedListPair
|
||||
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 []ForwardingRulesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ForwardingRulesScopedListPairIterator) 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 *ForwardingRulesScopedListPairIterator) Next() (ForwardingRulesScopedListPair, error) {
|
||||
var item ForwardingRulesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ForwardingRulesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ForwardingRulesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
144
vendor/cloud.google.com/go/compute/apiv1/gapic_metadata.json
generated
vendored
144
vendor/cloud.google.com/go/compute/apiv1/gapic_metadata.json
generated
vendored
|
|
@ -142,6 +142,11 @@
|
|||
"Get"
|
||||
]
|
||||
},
|
||||
"GetIamPolicy": {
|
||||
"methods": [
|
||||
"GetIamPolicy"
|
||||
]
|
||||
},
|
||||
"Insert": {
|
||||
"methods": [
|
||||
"Insert"
|
||||
|
|
@ -162,6 +167,16 @@
|
|||
"SetEdgeSecurityPolicy"
|
||||
]
|
||||
},
|
||||
"SetIamPolicy": {
|
||||
"methods": [
|
||||
"SetIamPolicy"
|
||||
]
|
||||
},
|
||||
"TestIamPermissions": {
|
||||
"methods": [
|
||||
"TestIamPermissions"
|
||||
]
|
||||
},
|
||||
"Update": {
|
||||
"methods": [
|
||||
"Update"
|
||||
|
|
@ -221,6 +236,11 @@
|
|||
"List"
|
||||
]
|
||||
},
|
||||
"ListUsable": {
|
||||
"methods": [
|
||||
"ListUsable"
|
||||
]
|
||||
},
|
||||
"Patch": {
|
||||
"methods": [
|
||||
"Patch"
|
||||
|
|
@ -241,6 +261,11 @@
|
|||
"SetSecurityPolicy"
|
||||
]
|
||||
},
|
||||
"TestIamPermissions": {
|
||||
"methods": [
|
||||
"TestIamPermissions"
|
||||
]
|
||||
},
|
||||
"Update": {
|
||||
"methods": [
|
||||
"Update"
|
||||
|
|
@ -1317,6 +1342,11 @@
|
|||
"SetScheduling"
|
||||
]
|
||||
},
|
||||
"SetSecurityPolicy": {
|
||||
"methods": [
|
||||
"SetSecurityPolicy"
|
||||
]
|
||||
},
|
||||
"SetServiceAccount": {
|
||||
"methods": [
|
||||
"SetServiceAccount"
|
||||
|
|
@ -1493,6 +1523,11 @@
|
|||
"GetDiagnostics"
|
||||
]
|
||||
},
|
||||
"GetMacsecConfig": {
|
||||
"methods": [
|
||||
"GetMacsecConfig"
|
||||
]
|
||||
},
|
||||
"Insert": {
|
||||
"methods": [
|
||||
"Insert"
|
||||
|
|
@ -1683,6 +1718,11 @@
|
|||
"List"
|
||||
]
|
||||
},
|
||||
"Patch": {
|
||||
"methods": [
|
||||
"Patch"
|
||||
]
|
||||
},
|
||||
"SetIamPolicy": {
|
||||
"methods": [
|
||||
"SetIamPolicy"
|
||||
|
|
@ -2213,6 +2253,11 @@
|
|||
"rest": {
|
||||
"libraryClient": "PublicAdvertisedPrefixesClient",
|
||||
"rpcs": {
|
||||
"Announce": {
|
||||
"methods": [
|
||||
"Announce"
|
||||
]
|
||||
},
|
||||
"Delete": {
|
||||
"methods": [
|
||||
"Delete"
|
||||
|
|
@ -2237,6 +2282,11 @@
|
|||
"methods": [
|
||||
"Patch"
|
||||
]
|
||||
},
|
||||
"Withdraw": {
|
||||
"methods": [
|
||||
"Withdraw"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2252,6 +2302,11 @@
|
|||
"AggregatedList"
|
||||
]
|
||||
},
|
||||
"Announce": {
|
||||
"methods": [
|
||||
"Announce"
|
||||
]
|
||||
},
|
||||
"Delete": {
|
||||
"methods": [
|
||||
"Delete"
|
||||
|
|
@ -2276,6 +2331,11 @@
|
|||
"methods": [
|
||||
"Patch"
|
||||
]
|
||||
},
|
||||
"Withdraw": {
|
||||
"methods": [
|
||||
"Withdraw"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2355,6 +2415,11 @@
|
|||
"List"
|
||||
]
|
||||
},
|
||||
"ListUsable": {
|
||||
"methods": [
|
||||
"ListUsable"
|
||||
]
|
||||
},
|
||||
"Patch": {
|
||||
"methods": [
|
||||
"Patch"
|
||||
|
|
@ -2365,6 +2430,16 @@
|
|||
"SetIamPolicy"
|
||||
]
|
||||
},
|
||||
"SetSecurityPolicy": {
|
||||
"methods": [
|
||||
"SetSecurityPolicy"
|
||||
]
|
||||
},
|
||||
"TestIamPermissions": {
|
||||
"methods": [
|
||||
"TestIamPermissions"
|
||||
]
|
||||
},
|
||||
"Update": {
|
||||
"methods": [
|
||||
"Update"
|
||||
|
|
@ -2775,11 +2850,21 @@
|
|||
"rest": {
|
||||
"libraryClient": "RegionNetworkEndpointGroupsClient",
|
||||
"rpcs": {
|
||||
"AttachNetworkEndpoints": {
|
||||
"methods": [
|
||||
"AttachNetworkEndpoints"
|
||||
]
|
||||
},
|
||||
"Delete": {
|
||||
"methods": [
|
||||
"Delete"
|
||||
]
|
||||
},
|
||||
"DetachNetworkEndpoints": {
|
||||
"methods": [
|
||||
"DetachNetworkEndpoints"
|
||||
]
|
||||
},
|
||||
"Get": {
|
||||
"methods": [
|
||||
"Get"
|
||||
|
|
@ -2794,6 +2879,11 @@
|
|||
"methods": [
|
||||
"List"
|
||||
]
|
||||
},
|
||||
"ListNetworkEndpoints": {
|
||||
"methods": [
|
||||
"ListNetworkEndpoints"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2956,6 +3046,11 @@
|
|||
"rest": {
|
||||
"libraryClient": "RegionSecurityPoliciesClient",
|
||||
"rpcs": {
|
||||
"AddRule": {
|
||||
"methods": [
|
||||
"AddRule"
|
||||
]
|
||||
},
|
||||
"Delete": {
|
||||
"methods": [
|
||||
"Delete"
|
||||
|
|
@ -2966,6 +3061,11 @@
|
|||
"Get"
|
||||
]
|
||||
},
|
||||
"GetRule": {
|
||||
"methods": [
|
||||
"GetRule"
|
||||
]
|
||||
},
|
||||
"Insert": {
|
||||
"methods": [
|
||||
"Insert"
|
||||
|
|
@ -2980,6 +3080,16 @@
|
|||
"methods": [
|
||||
"Patch"
|
||||
]
|
||||
},
|
||||
"PatchRule": {
|
||||
"methods": [
|
||||
"PatchRule"
|
||||
]
|
||||
},
|
||||
"RemoveRule": {
|
||||
"methods": [
|
||||
"RemoveRule"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3356,6 +3466,11 @@
|
|||
"Get"
|
||||
]
|
||||
},
|
||||
"GetNatIpInfo": {
|
||||
"methods": [
|
||||
"GetNatIpInfo"
|
||||
]
|
||||
},
|
||||
"GetNatMappingInfo": {
|
||||
"methods": [
|
||||
"GetNatMappingInfo"
|
||||
|
|
@ -3547,6 +3662,25 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"SnapshotSettingsService": {
|
||||
"clients": {
|
||||
"rest": {
|
||||
"libraryClient": "SnapshotSettingsClient",
|
||||
"rpcs": {
|
||||
"Get": {
|
||||
"methods": [
|
||||
"Get"
|
||||
]
|
||||
},
|
||||
"Patch": {
|
||||
"methods": [
|
||||
"Patch"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Snapshots": {
|
||||
"clients": {
|
||||
"rest": {
|
||||
|
|
@ -3914,6 +4048,11 @@
|
|||
"methods": [
|
||||
"List"
|
||||
]
|
||||
},
|
||||
"SetSecurityPolicy": {
|
||||
"methods": [
|
||||
"SetSecurityPolicy"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3978,6 +4117,11 @@
|
|||
"methods": [
|
||||
"SetBackup"
|
||||
]
|
||||
},
|
||||
"SetSecurityPolicy": {
|
||||
"methods": [
|
||||
"SetSecurityPolicy"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/global_addresses_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/global_addresses_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -221,7 +221,9 @@ func NewGlobalAddressesRESTClient(ctx context.Context, opts ...option.ClientOpti
|
|||
func defaultGlobalAddressesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/global_forwarding_rules_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/global_forwarding_rules_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -231,7 +231,9 @@ func NewGlobalForwardingRulesRESTClient(ctx context.Context, opts ...option.Clie
|
|||
func defaultGlobalForwardingRulesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
98
vendor/cloud.google.com/go/compute/apiv1/global_network_endpoint_groups_client.go
generated
vendored
98
vendor/cloud.google.com/go/compute/apiv1/global_network_endpoint_groups_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -231,7 +231,9 @@ func NewGlobalNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...optio
|
|||
func defaultGlobalNetworkEndpointGroupsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -809,97 +811,3 @@ func (c *globalNetworkEndpointGroupsRESTClient) ListNetworkEndpoints(ctx context
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// NetworkEndpointGroupIterator manages a stream of *computepb.NetworkEndpointGroup.
|
||||
type NetworkEndpointGroupIterator struct {
|
||||
items []*computepb.NetworkEndpointGroup
|
||||
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 []*computepb.NetworkEndpointGroup, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NetworkEndpointGroupIterator) 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 *NetworkEndpointGroupIterator) Next() (*computepb.NetworkEndpointGroup, error) {
|
||||
var item *computepb.NetworkEndpointGroup
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NetworkEndpointGroupIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NetworkEndpointGroupIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// NetworkEndpointWithHealthStatusIterator manages a stream of *computepb.NetworkEndpointWithHealthStatus.
|
||||
type NetworkEndpointWithHealthStatusIterator struct {
|
||||
items []*computepb.NetworkEndpointWithHealthStatus
|
||||
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 []*computepb.NetworkEndpointWithHealthStatus, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NetworkEndpointWithHealthStatusIterator) 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 *NetworkEndpointWithHealthStatusIterator) Next() (*computepb.NetworkEndpointWithHealthStatus, error) {
|
||||
var item *computepb.NetworkEndpointWithHealthStatus
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NetworkEndpointWithHealthStatusIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NetworkEndpointWithHealthStatusIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/global_operations_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/global_operations_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -207,7 +207,9 @@ func NewGlobalOperationsRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultGlobalOperationsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -277,6 +279,9 @@ func (c *globalOperationsRESTClient) AggregatedList(ctx context.Context, req *co
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -605,103 +610,3 @@ func (c *globalOperationsRESTClient) Wait(ctx context.Context, req *computepb.Wa
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// OperationIterator manages a stream of *computepb.Operation.
|
||||
type OperationIterator struct {
|
||||
items []*computepb.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 []*computepb.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() (*computepb.Operation, error) {
|
||||
var item *computepb.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
|
||||
}
|
||||
|
||||
// OperationsScopedListPair is a holder type for string/*computepb.OperationsScopedList map entries
|
||||
type OperationsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.OperationsScopedList
|
||||
}
|
||||
|
||||
// OperationsScopedListPairIterator manages a stream of OperationsScopedListPair.
|
||||
type OperationsScopedListPairIterator struct {
|
||||
items []OperationsScopedListPair
|
||||
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 []OperationsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *OperationsScopedListPairIterator) 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 *OperationsScopedListPairIterator) Next() (OperationsScopedListPair, error) {
|
||||
var item OperationsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *OperationsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *OperationsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/global_organization_operations_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/global_organization_operations_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -177,7 +177,9 @@ func NewGlobalOrganizationOperationsRESTClient(ctx context.Context, opts ...opti
|
|||
func defaultGlobalOrganizationOperationsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/global_public_delegated_prefixes_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/global_public_delegated_prefixes_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -211,7 +211,9 @@ func NewGlobalPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...opt
|
|||
func defaultGlobalPublicDelegatedPrefixesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -616,50 +618,3 @@ func (c *globalPublicDelegatedPrefixesRESTClient) Patch(ctx context.Context, req
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// PublicDelegatedPrefixIterator manages a stream of *computepb.PublicDelegatedPrefix.
|
||||
type PublicDelegatedPrefixIterator struct {
|
||||
items []*computepb.PublicDelegatedPrefix
|
||||
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 []*computepb.PublicDelegatedPrefix, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *PublicDelegatedPrefixIterator) 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 *PublicDelegatedPrefixIterator) Next() (*computepb.PublicDelegatedPrefix, error) {
|
||||
var item *computepb.PublicDelegatedPrefix
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *PublicDelegatedPrefixIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *PublicDelegatedPrefixIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/health_checks_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/health_checks_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -241,7 +241,9 @@ func NewHealthChecksRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultHealthChecksRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -314,6 +316,9 @@ func (c *healthChecksRESTClient) AggregatedList(ctx context.Context, req *comput
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -829,103 +834,3 @@ func (c *healthChecksRESTClient) Update(ctx context.Context, req *computepb.Upda
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// HealthCheckIterator manages a stream of *computepb.HealthCheck.
|
||||
type HealthCheckIterator struct {
|
||||
items []*computepb.HealthCheck
|
||||
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 []*computepb.HealthCheck, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *HealthCheckIterator) 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 *HealthCheckIterator) Next() (*computepb.HealthCheck, error) {
|
||||
var item *computepb.HealthCheck
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *HealthCheckIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *HealthCheckIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// HealthChecksScopedListPair is a holder type for string/*computepb.HealthChecksScopedList map entries
|
||||
type HealthChecksScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.HealthChecksScopedList
|
||||
}
|
||||
|
||||
// HealthChecksScopedListPairIterator manages a stream of HealthChecksScopedListPair.
|
||||
type HealthChecksScopedListPairIterator struct {
|
||||
items []HealthChecksScopedListPair
|
||||
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 []HealthChecksScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *HealthChecksScopedListPairIterator) 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 *HealthChecksScopedListPairIterator) Next() (HealthChecksScopedListPair, error) {
|
||||
var item HealthChecksScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *HealthChecksScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *HealthChecksScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/image_family_views_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/image_family_views_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -145,7 +145,9 @@ func NewImageFamilyViewsRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultImageFamilyViewsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/images_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/images_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -289,7 +289,9 @@ func NewImagesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ima
|
|||
func defaultImagesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -1083,50 +1085,3 @@ func (c *imagesRESTClient) TestIamPermissions(ctx context.Context, req *computep
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// ImageIterator manages a stream of *computepb.Image.
|
||||
type ImageIterator struct {
|
||||
items []*computepb.Image
|
||||
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 []*computepb.Image, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ImageIterator) 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 *ImageIterator) Next() (*computepb.Image, error) {
|
||||
var item *computepb.Image
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ImageIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ImageIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
248
vendor/cloud.google.com/go/compute/apiv1/instance_group_managers_client.go
generated
vendored
248
vendor/cloud.google.com/go/compute/apiv1/instance_group_managers_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -380,7 +380,9 @@ func NewInstanceGroupManagersRESTClient(ctx context.Context, opts ...option.Clie
|
|||
func defaultInstanceGroupManagersRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -530,6 +532,9 @@ func (c *instanceGroupManagersRESTClient) AggregatedList(ctx context.Context, re
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -2013,244 +2018,3 @@ func (c *instanceGroupManagersRESTClient) UpdatePerInstanceConfigs(ctx context.C
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// InstanceGroupManagerIterator manages a stream of *computepb.InstanceGroupManager.
|
||||
type InstanceGroupManagerIterator struct {
|
||||
items []*computepb.InstanceGroupManager
|
||||
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 []*computepb.InstanceGroupManager, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceGroupManagerIterator) 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 *InstanceGroupManagerIterator) Next() (*computepb.InstanceGroupManager, error) {
|
||||
var item *computepb.InstanceGroupManager
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceGroupManagerIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceGroupManagerIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// InstanceGroupManagersScopedListPair is a holder type for string/*computepb.InstanceGroupManagersScopedList map entries
|
||||
type InstanceGroupManagersScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.InstanceGroupManagersScopedList
|
||||
}
|
||||
|
||||
// InstanceGroupManagersScopedListPairIterator manages a stream of InstanceGroupManagersScopedListPair.
|
||||
type InstanceGroupManagersScopedListPairIterator struct {
|
||||
items []InstanceGroupManagersScopedListPair
|
||||
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 []InstanceGroupManagersScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceGroupManagersScopedListPairIterator) 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 *InstanceGroupManagersScopedListPairIterator) Next() (InstanceGroupManagersScopedListPair, error) {
|
||||
var item InstanceGroupManagersScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceGroupManagersScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceGroupManagersScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// InstanceManagedByIgmErrorIterator manages a stream of *computepb.InstanceManagedByIgmError.
|
||||
type InstanceManagedByIgmErrorIterator struct {
|
||||
items []*computepb.InstanceManagedByIgmError
|
||||
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 []*computepb.InstanceManagedByIgmError, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceManagedByIgmErrorIterator) 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 *InstanceManagedByIgmErrorIterator) Next() (*computepb.InstanceManagedByIgmError, error) {
|
||||
var item *computepb.InstanceManagedByIgmError
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceManagedByIgmErrorIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceManagedByIgmErrorIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// ManagedInstanceIterator manages a stream of *computepb.ManagedInstance.
|
||||
type ManagedInstanceIterator struct {
|
||||
items []*computepb.ManagedInstance
|
||||
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 []*computepb.ManagedInstance, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ManagedInstanceIterator) 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 *ManagedInstanceIterator) Next() (*computepb.ManagedInstance, error) {
|
||||
var item *computepb.ManagedInstance
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ManagedInstanceIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ManagedInstanceIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// PerInstanceConfigIterator manages a stream of *computepb.PerInstanceConfig.
|
||||
type PerInstanceConfigIterator struct {
|
||||
items []*computepb.PerInstanceConfig
|
||||
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 []*computepb.PerInstanceConfig, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *PerInstanceConfigIterator) 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 *PerInstanceConfigIterator) Next() (*computepb.PerInstanceConfig, error) {
|
||||
var item *computepb.PerInstanceConfig
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *PerInstanceConfigIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *PerInstanceConfigIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
154
vendor/cloud.google.com/go/compute/apiv1/instance_groups_client.go
generated
vendored
154
vendor/cloud.google.com/go/compute/apiv1/instance_groups_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -261,7 +261,9 @@ func NewInstanceGroupsRESTClient(ctx context.Context, opts ...option.ClientOptio
|
|||
func defaultInstanceGroupsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -411,6 +413,9 @@ func (c *instanceGroupsRESTClient) AggregatedList(ctx context.Context, req *comp
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1033,150 +1038,3 @@ func (c *instanceGroupsRESTClient) SetNamedPorts(ctx context.Context, req *compu
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// InstanceGroupIterator manages a stream of *computepb.InstanceGroup.
|
||||
type InstanceGroupIterator struct {
|
||||
items []*computepb.InstanceGroup
|
||||
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 []*computepb.InstanceGroup, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceGroupIterator) 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 *InstanceGroupIterator) Next() (*computepb.InstanceGroup, error) {
|
||||
var item *computepb.InstanceGroup
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceGroupIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceGroupIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// InstanceGroupsScopedListPair is a holder type for string/*computepb.InstanceGroupsScopedList map entries
|
||||
type InstanceGroupsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.InstanceGroupsScopedList
|
||||
}
|
||||
|
||||
// InstanceGroupsScopedListPairIterator manages a stream of InstanceGroupsScopedListPair.
|
||||
type InstanceGroupsScopedListPairIterator struct {
|
||||
items []InstanceGroupsScopedListPair
|
||||
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 []InstanceGroupsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceGroupsScopedListPairIterator) 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 *InstanceGroupsScopedListPairIterator) Next() (InstanceGroupsScopedListPair, error) {
|
||||
var item InstanceGroupsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceGroupsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceGroupsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// InstanceWithNamedPortsIterator manages a stream of *computepb.InstanceWithNamedPorts.
|
||||
type InstanceWithNamedPortsIterator struct {
|
||||
items []*computepb.InstanceWithNamedPorts
|
||||
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 []*computepb.InstanceWithNamedPorts, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceWithNamedPortsIterator) 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 *InstanceWithNamedPortsIterator) Next() (*computepb.InstanceWithNamedPorts, error) {
|
||||
var item *computepb.InstanceWithNamedPorts
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceWithNamedPortsIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceWithNamedPortsIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/instance_templates_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/instance_templates_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -260,7 +260,9 @@ func NewInstanceTemplatesRESTClient(ctx context.Context, opts ...option.ClientOp
|
|||
func defaultInstanceTemplatesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -333,6 +335,9 @@ func (c *instanceTemplatesRESTClient) AggregatedList(ctx context.Context, req *c
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -882,103 +887,3 @@ func (c *instanceTemplatesRESTClient) TestIamPermissions(ctx context.Context, re
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// InstanceTemplateIterator manages a stream of *computepb.InstanceTemplate.
|
||||
type InstanceTemplateIterator struct {
|
||||
items []*computepb.InstanceTemplate
|
||||
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 []*computepb.InstanceTemplate, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceTemplateIterator) 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 *InstanceTemplateIterator) Next() (*computepb.InstanceTemplate, error) {
|
||||
var item *computepb.InstanceTemplate
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceTemplateIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceTemplateIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// InstanceTemplatesScopedListPair is a holder type for string/*computepb.InstanceTemplatesScopedList map entries
|
||||
type InstanceTemplatesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.InstanceTemplatesScopedList
|
||||
}
|
||||
|
||||
// InstanceTemplatesScopedListPairIterator manages a stream of InstanceTemplatesScopedListPair.
|
||||
type InstanceTemplatesScopedListPairIterator struct {
|
||||
items []InstanceTemplatesScopedListPair
|
||||
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 []InstanceTemplatesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceTemplatesScopedListPairIterator) 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 *InstanceTemplatesScopedListPairIterator) Next() (InstanceTemplatesScopedListPair, error) {
|
||||
var item InstanceTemplatesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceTemplatesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceTemplatesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
241
vendor/cloud.google.com/go/compute/apiv1/instances_client.go
generated
vendored
241
vendor/cloud.google.com/go/compute/apiv1/instances_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -75,6 +75,7 @@ type InstancesCallOptions struct {
|
|||
SetMinCpuPlatform []gax.CallOption
|
||||
SetName []gax.CallOption
|
||||
SetScheduling []gax.CallOption
|
||||
SetSecurityPolicy []gax.CallOption
|
||||
SetServiceAccount []gax.CallOption
|
||||
SetShieldedInstanceIntegrityPolicy []gax.CallOption
|
||||
SetTags []gax.CallOption
|
||||
|
|
@ -279,6 +280,9 @@ func defaultInstancesRESTCallOptions() *InstancesCallOptions {
|
|||
SetScheduling: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
SetSecurityPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
SetServiceAccount: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -361,6 +365,7 @@ type internalInstancesClient interface {
|
|||
SetMinCpuPlatform(context.Context, *computepb.SetMinCpuPlatformInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetName(context.Context, *computepb.SetNameInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetScheduling(context.Context, *computepb.SetSchedulingInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetSecurityPolicy(context.Context, *computepb.SetSecurityPolicyInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetServiceAccount(context.Context, *computepb.SetServiceAccountInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetShieldedInstanceIntegrityPolicy(context.Context, *computepb.SetShieldedInstanceIntegrityPolicyInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetTags(context.Context, *computepb.SetTagsInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
|
|
@ -572,6 +577,11 @@ func (c *InstancesClient) SetScheduling(ctx context.Context, req *computepb.SetS
|
|||
return c.internalClient.SetScheduling(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview
|
||||
func (c *InstancesClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyInstanceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.SetSecurityPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetServiceAccount sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
|
||||
func (c *InstancesClient) SetServiceAccount(ctx context.Context, req *computepb.SetServiceAccountInstanceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.SetServiceAccount(ctx, req, opts...)
|
||||
|
|
@ -694,7 +704,9 @@ func NewInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (*
|
|||
func defaultInstancesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -922,6 +934,9 @@ func (c *instancesRESTClient) AggregatedList(ctx context.Context, req *computepb
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -3071,6 +3086,83 @@ func (c *instancesRESTClient) SetScheduling(ctx context.Context, req *computepb.
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview
|
||||
func (c *instancesRESTClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyInstanceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetInstancesSetSecurityPolicyRequestResource()
|
||||
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("/compute/v1/projects/%v/zones/%v/instances/%v/setSecurityPolicy", req.GetProject(), req.GetZone(), req.GetInstance())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
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&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "instance", url.QueryEscape(req.GetInstance()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).SetSecurityPolicy[0:len((*c.CallOptions).SetSecurityPolicy):len((*c.CallOptions).SetSecurityPolicy)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
&zoneOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
zone: req.GetZone(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// SetServiceAccount sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
|
||||
func (c *instancesRESTClient) SetServiceAccount(ctx context.Context, req *computepb.SetServiceAccountInstanceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -4119,150 +4211,3 @@ func (c *instancesRESTClient) UpdateShieldedInstanceConfig(ctx context.Context,
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// InstanceIterator manages a stream of *computepb.Instance.
|
||||
type InstanceIterator struct {
|
||||
items []*computepb.Instance
|
||||
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 []*computepb.Instance, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstanceIterator) 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 *InstanceIterator) Next() (*computepb.Instance, error) {
|
||||
var item *computepb.Instance
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstanceIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstanceIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// InstancesScopedListPair is a holder type for string/*computepb.InstancesScopedList map entries
|
||||
type InstancesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.InstancesScopedList
|
||||
}
|
||||
|
||||
// InstancesScopedListPairIterator manages a stream of InstancesScopedListPair.
|
||||
type InstancesScopedListPairIterator struct {
|
||||
items []InstancesScopedListPair
|
||||
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 []InstancesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InstancesScopedListPairIterator) 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 *InstancesScopedListPairIterator) Next() (InstancesScopedListPair, error) {
|
||||
var item InstancesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InstancesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InstancesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// ReferenceIterator manages a stream of *computepb.Reference.
|
||||
type ReferenceIterator struct {
|
||||
items []*computepb.Reference
|
||||
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 []*computepb.Reference, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ReferenceIterator) 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 *ReferenceIterator) Next() (*computepb.Reference, error) {
|
||||
var item *computepb.Reference
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ReferenceIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ReferenceIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/interconnect_attachments_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/interconnect_attachments_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -241,7 +241,9 @@ func NewInterconnectAttachmentsRESTClient(ctx context.Context, opts ...option.Cl
|
|||
func defaultInterconnectAttachmentsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -314,6 +316,9 @@ func (c *interconnectAttachmentsRESTClient) AggregatedList(ctx context.Context,
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -836,103 +841,3 @@ func (c *interconnectAttachmentsRESTClient) SetLabels(ctx context.Context, req *
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// InterconnectAttachmentIterator manages a stream of *computepb.InterconnectAttachment.
|
||||
type InterconnectAttachmentIterator struct {
|
||||
items []*computepb.InterconnectAttachment
|
||||
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 []*computepb.InterconnectAttachment, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InterconnectAttachmentIterator) 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 *InterconnectAttachmentIterator) Next() (*computepb.InterconnectAttachment, error) {
|
||||
var item *computepb.InterconnectAttachment
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InterconnectAttachmentIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InterconnectAttachmentIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// InterconnectAttachmentsScopedListPair is a holder type for string/*computepb.InterconnectAttachmentsScopedList map entries
|
||||
type InterconnectAttachmentsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.InterconnectAttachmentsScopedList
|
||||
}
|
||||
|
||||
// InterconnectAttachmentsScopedListPairIterator manages a stream of InterconnectAttachmentsScopedListPair.
|
||||
type InterconnectAttachmentsScopedListPairIterator struct {
|
||||
items []InterconnectAttachmentsScopedListPair
|
||||
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 []InterconnectAttachmentsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InterconnectAttachmentsScopedListPairIterator) 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 *InterconnectAttachmentsScopedListPairIterator) Next() (InterconnectAttachmentsScopedListPair, error) {
|
||||
var item InterconnectAttachmentsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InterconnectAttachmentsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InterconnectAttachmentsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/interconnect_locations_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/interconnect_locations_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -167,7 +167,9 @@ func NewInterconnectLocationsRESTClient(ctx context.Context, opts ...option.Clie
|
|||
func defaultInterconnectLocationsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -348,50 +350,3 @@ func (c *interconnectLocationsRESTClient) List(ctx context.Context, req *compute
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// InterconnectLocationIterator manages a stream of *computepb.InterconnectLocation.
|
||||
type InterconnectLocationIterator struct {
|
||||
items []*computepb.InterconnectLocation
|
||||
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 []*computepb.InterconnectLocation, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InterconnectLocationIterator) 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 *InterconnectLocationIterator) Next() (*computepb.InterconnectLocation, error) {
|
||||
var item *computepb.InterconnectLocation
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InterconnectLocationIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InterconnectLocationIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/interconnect_remote_locations_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/interconnect_remote_locations_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -167,7 +167,9 @@ func NewInterconnectRemoteLocationsRESTClient(ctx context.Context, opts ...optio
|
|||
func defaultInterconnectRemoteLocationsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -348,50 +350,3 @@ func (c *interconnectRemoteLocationsRESTClient) List(ctx context.Context, req *c
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// InterconnectRemoteLocationIterator manages a stream of *computepb.InterconnectRemoteLocation.
|
||||
type InterconnectRemoteLocationIterator struct {
|
||||
items []*computepb.InterconnectRemoteLocation
|
||||
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 []*computepb.InterconnectRemoteLocation, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InterconnectRemoteLocationIterator) 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 *InterconnectRemoteLocationIterator) Next() (*computepb.InterconnectRemoteLocation, error) {
|
||||
var item *computepb.InterconnectRemoteLocation
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InterconnectRemoteLocationIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InterconnectRemoteLocationIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
143
vendor/cloud.google.com/go/compute/apiv1/interconnects_client.go
generated
vendored
143
vendor/cloud.google.com/go/compute/apiv1/interconnects_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -42,13 +42,14 @@ var newInterconnectsClientHook clientHook
|
|||
|
||||
// InterconnectsCallOptions contains the retry settings for each method of InterconnectsClient.
|
||||
type InterconnectsCallOptions struct {
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
GetDiagnostics []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
SetLabels []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
GetDiagnostics []gax.CallOption
|
||||
GetMacsecConfig []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
SetLabels []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultInterconnectsRESTCallOptions() *InterconnectsCallOptions {
|
||||
|
|
@ -80,6 +81,18 @@ func defaultInterconnectsRESTCallOptions() *InterconnectsCallOptions {
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
GetMacsecConfig: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnHTTPCodes(gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.30,
|
||||
},
|
||||
http.StatusGatewayTimeout,
|
||||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Insert: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -112,6 +125,7 @@ type internalInterconnectsClient interface {
|
|||
Delete(context.Context, *computepb.DeleteInterconnectRequest, ...gax.CallOption) (*Operation, error)
|
||||
Get(context.Context, *computepb.GetInterconnectRequest, ...gax.CallOption) (*computepb.Interconnect, error)
|
||||
GetDiagnostics(context.Context, *computepb.GetDiagnosticsInterconnectRequest, ...gax.CallOption) (*computepb.InterconnectsGetDiagnosticsResponse, error)
|
||||
GetMacsecConfig(context.Context, *computepb.GetMacsecConfigInterconnectRequest, ...gax.CallOption) (*computepb.InterconnectsGetMacsecConfigResponse, error)
|
||||
Insert(context.Context, *computepb.InsertInterconnectRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListInterconnectsRequest, ...gax.CallOption) *InterconnectIterator
|
||||
Patch(context.Context, *computepb.PatchInterconnectRequest, ...gax.CallOption) (*Operation, error)
|
||||
|
|
@ -163,11 +177,16 @@ func (c *InterconnectsClient) Get(ctx context.Context, req *computepb.GetInterco
|
|||
return c.internalClient.Get(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// GetDiagnostics returns the interconnectDiagnostics for the specified Interconnect.
|
||||
// GetDiagnostics returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.
|
||||
func (c *InterconnectsClient) GetDiagnostics(ctx context.Context, req *computepb.GetDiagnosticsInterconnectRequest, opts ...gax.CallOption) (*computepb.InterconnectsGetDiagnosticsResponse, error) {
|
||||
return c.internalClient.GetDiagnostics(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// GetMacsecConfig returns the interconnectMacsecConfig for the specified Interconnect.
|
||||
func (c *InterconnectsClient) GetMacsecConfig(ctx context.Context, req *computepb.GetMacsecConfigInterconnectRequest, opts ...gax.CallOption) (*computepb.InterconnectsGetMacsecConfigResponse, error) {
|
||||
return c.internalClient.GetMacsecConfig(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Insert creates an Interconnect in the specified project using the data included in the request.
|
||||
func (c *InterconnectsClient) Insert(ctx context.Context, req *computepb.InsertInterconnectRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Insert(ctx, req, opts...)
|
||||
|
|
@ -240,7 +259,9 @@ func NewInterconnectsRESTClient(ctx context.Context, opts ...option.ClientOption
|
|||
func defaultInterconnectsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -397,7 +418,7 @@ func (c *interconnectsRESTClient) Get(ctx context.Context, req *computepb.GetInt
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
// GetDiagnostics returns the interconnectDiagnostics for the specified Interconnect.
|
||||
// GetDiagnostics returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.
|
||||
func (c *interconnectsRESTClient) GetDiagnostics(ctx context.Context, req *computepb.GetDiagnosticsInterconnectRequest, opts ...gax.CallOption) (*computepb.InterconnectsGetDiagnosticsResponse, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
|
|
@ -452,6 +473,61 @@ func (c *interconnectsRESTClient) GetDiagnostics(ctx context.Context, req *compu
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
// GetMacsecConfig returns the interconnectMacsecConfig for the specified Interconnect.
|
||||
func (c *interconnectsRESTClient) GetMacsecConfig(ctx context.Context, req *computepb.GetMacsecConfigInterconnectRequest, opts ...gax.CallOption) (*computepb.InterconnectsGetMacsecConfigResponse, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/interconnects/%v/getMacsecConfig", req.GetProject(), req.GetInterconnect())
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "interconnect", url.QueryEscape(req.GetInterconnect()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).GetMacsecConfig[0:len((*c.CallOptions).GetMacsecConfig):len((*c.CallOptions).GetMacsecConfig)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.InterconnectsGetMacsecConfigResponse{}
|
||||
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
|
||||
}
|
||||
|
||||
// Insert creates an Interconnect in the specified project using the data included in the request.
|
||||
func (c *interconnectsRESTClient) Insert(ctx context.Context, req *computepb.InsertInterconnectRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -769,50 +845,3 @@ func (c *interconnectsRESTClient) SetLabels(ctx context.Context, req *computepb.
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// InterconnectIterator manages a stream of *computepb.Interconnect.
|
||||
type InterconnectIterator struct {
|
||||
items []*computepb.Interconnect
|
||||
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 []*computepb.Interconnect, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *InterconnectIterator) 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 *InterconnectIterator) Next() (*computepb.Interconnect, error) {
|
||||
var item *computepb.Interconnect
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *InterconnectIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *InterconnectIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/license_codes_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/license_codes_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -156,7 +156,9 @@ func NewLicenseCodesRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultLicenseCodesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/licenses_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/licenses_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -240,7 +240,9 @@ func NewLicensesRESTClient(ctx context.Context, opts ...option.ClientOption) (*L
|
|||
func defaultLicensesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -755,50 +757,3 @@ func (c *licensesRESTClient) TestIamPermissions(ctx context.Context, req *comput
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// LicenseIterator manages a stream of *computepb.License.
|
||||
type LicenseIterator struct {
|
||||
items []*computepb.License
|
||||
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 []*computepb.License, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *LicenseIterator) 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 *LicenseIterator) Next() (*computepb.License, error) {
|
||||
var item *computepb.License
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *LicenseIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *LicenseIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/machine_images_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/machine_images_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -240,7 +240,9 @@ func NewMachineImagesRESTClient(ctx context.Context, opts ...option.ClientOption
|
|||
func defaultMachineImagesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -758,50 +760,3 @@ func (c *machineImagesRESTClient) TestIamPermissions(ctx context.Context, req *c
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// MachineImageIterator manages a stream of *computepb.MachineImage.
|
||||
type MachineImageIterator struct {
|
||||
items []*computepb.MachineImage
|
||||
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 []*computepb.MachineImage, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *MachineImageIterator) 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 *MachineImageIterator) Next() (*computepb.MachineImage, error) {
|
||||
var item *computepb.MachineImage
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *MachineImageIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *MachineImageIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/machine_types_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/machine_types_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -187,7 +187,9 @@ func NewMachineTypesRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultMachineTypesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -257,6 +259,9 @@ func (c *machineTypesRESTClient) AggregatedList(ctx context.Context, req *comput
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -475,103 +480,3 @@ func (c *machineTypesRESTClient) List(ctx context.Context, req *computepb.ListMa
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// MachineTypeIterator manages a stream of *computepb.MachineType.
|
||||
type MachineTypeIterator struct {
|
||||
items []*computepb.MachineType
|
||||
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 []*computepb.MachineType, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *MachineTypeIterator) 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 *MachineTypeIterator) Next() (*computepb.MachineType, error) {
|
||||
var item *computepb.MachineType
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *MachineTypeIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *MachineTypeIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// MachineTypesScopedListPair is a holder type for string/*computepb.MachineTypesScopedList map entries
|
||||
type MachineTypesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.MachineTypesScopedList
|
||||
}
|
||||
|
||||
// MachineTypesScopedListPairIterator manages a stream of MachineTypesScopedListPair.
|
||||
type MachineTypesScopedListPairIterator struct {
|
||||
items []MachineTypesScopedListPair
|
||||
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 []MachineTypesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *MachineTypesScopedListPairIterator) 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 *MachineTypesScopedListPairIterator) Next() (MachineTypesScopedListPair, error) {
|
||||
var item MachineTypesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *MachineTypesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *MachineTypesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
194
vendor/cloud.google.com/go/compute/apiv1/network_attachments_client.go
generated
vendored
194
vendor/cloud.google.com/go/compute/apiv1/network_attachments_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -49,6 +49,7 @@ type NetworkAttachmentsCallOptions struct {
|
|||
GetIamPolicy []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
SetIamPolicy []gax.CallOption
|
||||
TestIamPermissions []gax.CallOption
|
||||
}
|
||||
|
|
@ -109,6 +110,9 @@ func defaultNetworkAttachmentsRESTCallOptions() *NetworkAttachmentsCallOptions {
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Patch: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
SetIamPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -129,6 +133,7 @@ type internalNetworkAttachmentsClient interface {
|
|||
GetIamPolicy(context.Context, *computepb.GetIamPolicyNetworkAttachmentRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
Insert(context.Context, *computepb.InsertNetworkAttachmentRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListNetworkAttachmentsRequest, ...gax.CallOption) *NetworkAttachmentIterator
|
||||
Patch(context.Context, *computepb.PatchNetworkAttachmentRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetIamPolicy(context.Context, *computepb.SetIamPolicyNetworkAttachmentRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
TestIamPermissions(context.Context, *computepb.TestIamPermissionsNetworkAttachmentRequest, ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
|
||||
}
|
||||
|
|
@ -198,6 +203,11 @@ func (c *NetworkAttachmentsClient) List(ctx context.Context, req *computepb.List
|
|||
return c.internalClient.List(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Patch patches the specified NetworkAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
|
||||
func (c *NetworkAttachmentsClient) Patch(ctx context.Context, req *computepb.PatchNetworkAttachmentRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Patch(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
|
||||
func (c *NetworkAttachmentsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNetworkAttachmentRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
|
||||
return c.internalClient.SetIamPolicy(ctx, req, opts...)
|
||||
|
|
@ -260,7 +270,9 @@ func NewNetworkAttachmentsRESTClient(ctx context.Context, opts ...option.ClientO
|
|||
func defaultNetworkAttachmentsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -333,6 +345,9 @@ func (c *networkAttachmentsRESTClient) AggregatedList(ctx context.Context, req *
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -761,6 +776,83 @@ func (c *networkAttachmentsRESTClient) List(ctx context.Context, req *computepb.
|
|||
return it
|
||||
}
|
||||
|
||||
// Patch patches the specified NetworkAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
|
||||
func (c *networkAttachmentsRESTClient) Patch(ctx context.Context, req *computepb.PatchNetworkAttachmentRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetNetworkAttachmentResource()
|
||||
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("/compute/v1/projects/%v/regions/%v/networkAttachments/%v", req.GetProject(), req.GetRegion(), req.GetNetworkAttachment())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
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&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "network_attachment", url.QueryEscape(req.GetNetworkAttachment()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).Patch[0:len((*c.CallOptions).Patch):len((*c.CallOptions).Patch)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
if settings.Path != "" {
|
||||
baseUrl.Path = settings.Path
|
||||
}
|
||||
httpReq, err := http.NewRequest("PATCH", 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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
|
||||
func (c *networkAttachmentsRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNetworkAttachmentRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -884,103 +976,3 @@ func (c *networkAttachmentsRESTClient) TestIamPermissions(ctx context.Context, r
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// NetworkAttachmentIterator manages a stream of *computepb.NetworkAttachment.
|
||||
type NetworkAttachmentIterator struct {
|
||||
items []*computepb.NetworkAttachment
|
||||
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 []*computepb.NetworkAttachment, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NetworkAttachmentIterator) 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 *NetworkAttachmentIterator) Next() (*computepb.NetworkAttachment, error) {
|
||||
var item *computepb.NetworkAttachment
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NetworkAttachmentIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NetworkAttachmentIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// NetworkAttachmentsScopedListPair is a holder type for string/*computepb.NetworkAttachmentsScopedList map entries
|
||||
type NetworkAttachmentsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.NetworkAttachmentsScopedList
|
||||
}
|
||||
|
||||
// NetworkAttachmentsScopedListPairIterator manages a stream of NetworkAttachmentsScopedListPair.
|
||||
type NetworkAttachmentsScopedListPairIterator struct {
|
||||
items []NetworkAttachmentsScopedListPair
|
||||
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 []NetworkAttachmentsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NetworkAttachmentsScopedListPairIterator) 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 *NetworkAttachmentsScopedListPairIterator) Next() (NetworkAttachmentsScopedListPair, error) {
|
||||
var item NetworkAttachmentsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NetworkAttachmentsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NetworkAttachmentsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/network_edge_security_services_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/network_edge_security_services_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -212,7 +212,9 @@ func NewNetworkEdgeSecurityServicesRESTClient(ctx context.Context, opts ...optio
|
|||
func defaultNetworkEdgeSecurityServicesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -285,6 +287,9 @@ func (c *networkEdgeSecurityServicesRESTClient) AggregatedList(ctx context.Conte
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -639,56 +644,3 @@ func (c *networkEdgeSecurityServicesRESTClient) Patch(ctx context.Context, req *
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// NetworkEdgeSecurityServicesScopedListPair is a holder type for string/*computepb.NetworkEdgeSecurityServicesScopedList map entries
|
||||
type NetworkEdgeSecurityServicesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.NetworkEdgeSecurityServicesScopedList
|
||||
}
|
||||
|
||||
// NetworkEdgeSecurityServicesScopedListPairIterator manages a stream of NetworkEdgeSecurityServicesScopedListPair.
|
||||
type NetworkEdgeSecurityServicesScopedListPairIterator struct {
|
||||
items []NetworkEdgeSecurityServicesScopedListPair
|
||||
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 []NetworkEdgeSecurityServicesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NetworkEdgeSecurityServicesScopedListPairIterator) 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 *NetworkEdgeSecurityServicesScopedListPairIterator) Next() (NetworkEdgeSecurityServicesScopedListPair, error) {
|
||||
var item NetworkEdgeSecurityServicesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NetworkEdgeSecurityServicesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NetworkEdgeSecurityServicesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/network_endpoint_groups_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/network_endpoint_groups_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -261,7 +261,9 @@ func NewNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.Clie
|
|||
func defaultNetworkEndpointGroupsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -334,6 +336,9 @@ func (c *networkEndpointGroupsRESTClient) AggregatedList(ctx context.Context, re
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1018,56 +1023,3 @@ func (c *networkEndpointGroupsRESTClient) TestIamPermissions(ctx context.Context
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// NetworkEndpointGroupsScopedListPair is a holder type for string/*computepb.NetworkEndpointGroupsScopedList map entries
|
||||
type NetworkEndpointGroupsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.NetworkEndpointGroupsScopedList
|
||||
}
|
||||
|
||||
// NetworkEndpointGroupsScopedListPairIterator manages a stream of NetworkEndpointGroupsScopedListPair.
|
||||
type NetworkEndpointGroupsScopedListPairIterator struct {
|
||||
items []NetworkEndpointGroupsScopedListPair
|
||||
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 []NetworkEndpointGroupsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NetworkEndpointGroupsScopedListPairIterator) 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 *NetworkEndpointGroupsScopedListPairIterator) Next() (NetworkEndpointGroupsScopedListPair, error) {
|
||||
var item NetworkEndpointGroupsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NetworkEndpointGroupsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NetworkEndpointGroupsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/network_firewall_policies_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/network_firewall_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -348,7 +348,9 @@ func NewNetworkFirewallPoliciesRESTClient(ctx context.Context, opts ...option.Cl
|
|||
func defaultNetworkFirewallPoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
98
vendor/cloud.google.com/go/compute/apiv1/networks_client.go
generated
vendored
98
vendor/cloud.google.com/go/compute/apiv1/networks_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -289,7 +289,9 @@ func NewNetworksRESTClient(ctx context.Context, opts ...option.ClientOption) (*N
|
|||
func defaultNetworksRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -1152,97 +1154,3 @@ func (c *networksRESTClient) UpdatePeering(ctx context.Context, req *computepb.U
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// ExchangedPeeringRouteIterator manages a stream of *computepb.ExchangedPeeringRoute.
|
||||
type ExchangedPeeringRouteIterator struct {
|
||||
items []*computepb.ExchangedPeeringRoute
|
||||
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 []*computepb.ExchangedPeeringRoute, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ExchangedPeeringRouteIterator) 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 *ExchangedPeeringRouteIterator) Next() (*computepb.ExchangedPeeringRoute, error) {
|
||||
var item *computepb.ExchangedPeeringRoute
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ExchangedPeeringRouteIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ExchangedPeeringRouteIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// NetworkIterator manages a stream of *computepb.Network.
|
||||
type NetworkIterator struct {
|
||||
items []*computepb.Network
|
||||
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 []*computepb.Network, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NetworkIterator) 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 *NetworkIterator) Next() (*computepb.Network, error) {
|
||||
var item *computepb.Network
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NetworkIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NetworkIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
154
vendor/cloud.google.com/go/compute/apiv1/node_groups_client.go
generated
vendored
154
vendor/cloud.google.com/go/compute/apiv1/node_groups_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -320,7 +320,9 @@ func NewNodeGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (
|
|||
func defaultNodeGroupsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -470,6 +472,9 @@ func (c *nodeGroupsRESTClient) AggregatedList(ctx context.Context, req *computep
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1427,150 +1432,3 @@ func (c *nodeGroupsRESTClient) TestIamPermissions(ctx context.Context, req *comp
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// NodeGroupIterator manages a stream of *computepb.NodeGroup.
|
||||
type NodeGroupIterator struct {
|
||||
items []*computepb.NodeGroup
|
||||
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 []*computepb.NodeGroup, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NodeGroupIterator) 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 *NodeGroupIterator) Next() (*computepb.NodeGroup, error) {
|
||||
var item *computepb.NodeGroup
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NodeGroupIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NodeGroupIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// NodeGroupNodeIterator manages a stream of *computepb.NodeGroupNode.
|
||||
type NodeGroupNodeIterator struct {
|
||||
items []*computepb.NodeGroupNode
|
||||
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 []*computepb.NodeGroupNode, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NodeGroupNodeIterator) 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 *NodeGroupNodeIterator) Next() (*computepb.NodeGroupNode, error) {
|
||||
var item *computepb.NodeGroupNode
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NodeGroupNodeIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NodeGroupNodeIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// NodeGroupsScopedListPair is a holder type for string/*computepb.NodeGroupsScopedList map entries
|
||||
type NodeGroupsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.NodeGroupsScopedList
|
||||
}
|
||||
|
||||
// NodeGroupsScopedListPairIterator manages a stream of NodeGroupsScopedListPair.
|
||||
type NodeGroupsScopedListPairIterator struct {
|
||||
items []NodeGroupsScopedListPair
|
||||
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 []NodeGroupsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NodeGroupsScopedListPairIterator) 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 *NodeGroupsScopedListPairIterator) Next() (NodeGroupsScopedListPair, error) {
|
||||
var item NodeGroupsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NodeGroupsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NodeGroupsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/node_templates_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/node_templates_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -260,7 +260,9 @@ func NewNodeTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption
|
|||
func defaultNodeTemplatesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -333,6 +335,9 @@ func (c *nodeTemplatesRESTClient) AggregatedList(ctx context.Context, req *compu
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -884,103 +889,3 @@ func (c *nodeTemplatesRESTClient) TestIamPermissions(ctx context.Context, req *c
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// NodeTemplateIterator manages a stream of *computepb.NodeTemplate.
|
||||
type NodeTemplateIterator struct {
|
||||
items []*computepb.NodeTemplate
|
||||
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 []*computepb.NodeTemplate, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NodeTemplateIterator) 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 *NodeTemplateIterator) Next() (*computepb.NodeTemplate, error) {
|
||||
var item *computepb.NodeTemplate
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NodeTemplateIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NodeTemplateIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// NodeTemplatesScopedListPair is a holder type for string/*computepb.NodeTemplatesScopedList map entries
|
||||
type NodeTemplatesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.NodeTemplatesScopedList
|
||||
}
|
||||
|
||||
// NodeTemplatesScopedListPairIterator manages a stream of NodeTemplatesScopedListPair.
|
||||
type NodeTemplatesScopedListPairIterator struct {
|
||||
items []NodeTemplatesScopedListPair
|
||||
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 []NodeTemplatesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NodeTemplatesScopedListPairIterator) 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 *NodeTemplatesScopedListPairIterator) Next() (NodeTemplatesScopedListPair, error) {
|
||||
var item NodeTemplatesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NodeTemplatesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NodeTemplatesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/node_types_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/node_types_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -187,7 +187,9 @@ func NewNodeTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*
|
|||
func defaultNodeTypesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -257,6 +259,9 @@ func (c *nodeTypesRESTClient) AggregatedList(ctx context.Context, req *computepb
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -475,103 +480,3 @@ func (c *nodeTypesRESTClient) List(ctx context.Context, req *computepb.ListNodeT
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// NodeTypeIterator manages a stream of *computepb.NodeType.
|
||||
type NodeTypeIterator struct {
|
||||
items []*computepb.NodeType
|
||||
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 []*computepb.NodeType, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NodeTypeIterator) 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 *NodeTypeIterator) Next() (*computepb.NodeType, error) {
|
||||
var item *computepb.NodeType
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NodeTypeIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NodeTypeIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// NodeTypesScopedListPair is a holder type for string/*computepb.NodeTypesScopedList map entries
|
||||
type NodeTypesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.NodeTypesScopedList
|
||||
}
|
||||
|
||||
// NodeTypesScopedListPairIterator manages a stream of NodeTypesScopedListPair.
|
||||
type NodeTypesScopedListPairIterator struct {
|
||||
items []NodeTypesScopedListPair
|
||||
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 []NodeTypesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NodeTypesScopedListPairIterator) 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 *NodeTypesScopedListPairIterator) Next() (NodeTypesScopedListPair, error) {
|
||||
var item NodeTypesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NodeTypesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NodeTypesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
2
vendor/cloud.google.com/go/compute/apiv1/operations.go
generated
vendored
2
vendor/cloud.google.com/go/compute/apiv1/operations.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/packet_mirrorings_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/packet_mirrorings_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -241,7 +241,9 @@ func NewPacketMirroringsRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultPacketMirroringsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -314,6 +316,9 @@ func (c *packetMirroringsRESTClient) AggregatedList(ctx context.Context, req *co
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -818,103 +823,3 @@ func (c *packetMirroringsRESTClient) TestIamPermissions(ctx context.Context, req
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// PacketMirroringIterator manages a stream of *computepb.PacketMirroring.
|
||||
type PacketMirroringIterator struct {
|
||||
items []*computepb.PacketMirroring
|
||||
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 []*computepb.PacketMirroring, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *PacketMirroringIterator) 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 *PacketMirroringIterator) Next() (*computepb.PacketMirroring, error) {
|
||||
var item *computepb.PacketMirroring
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *PacketMirroringIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *PacketMirroringIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// PacketMirroringsScopedListPair is a holder type for string/*computepb.PacketMirroringsScopedList map entries
|
||||
type PacketMirroringsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.PacketMirroringsScopedList
|
||||
}
|
||||
|
||||
// PacketMirroringsScopedListPairIterator manages a stream of PacketMirroringsScopedListPair.
|
||||
type PacketMirroringsScopedListPairIterator struct {
|
||||
items []PacketMirroringsScopedListPair
|
||||
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 []PacketMirroringsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *PacketMirroringsScopedListPairIterator) 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 *PacketMirroringsScopedListPairIterator) Next() (PacketMirroringsScopedListPair, error) {
|
||||
var item PacketMirroringsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *PacketMirroringsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *PacketMirroringsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
98
vendor/cloud.google.com/go/compute/apiv1/projects_client.go
generated
vendored
98
vendor/cloud.google.com/go/compute/apiv1/projects_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -300,7 +300,9 @@ func NewProjectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*P
|
|||
func defaultProjectsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -1312,97 +1314,3 @@ func (c *projectsRESTClient) SetUsageExportBucket(ctx context.Context, req *comp
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// ProjectIterator manages a stream of *computepb.Project.
|
||||
type ProjectIterator struct {
|
||||
items []*computepb.Project
|
||||
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 []*computepb.Project, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ProjectIterator) 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 *ProjectIterator) Next() (*computepb.Project, error) {
|
||||
var item *computepb.Project
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ProjectIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ProjectIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// XpnResourceIdIterator manages a stream of *computepb.XpnResourceId.
|
||||
type XpnResourceIdIterator struct {
|
||||
items []*computepb.XpnResourceId
|
||||
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 []*computepb.XpnResourceId, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *XpnResourceIdIterator) 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 *XpnResourceIdIterator) Next() (*computepb.XpnResourceId, error) {
|
||||
var item *computepb.XpnResourceId
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *XpnResourceIdIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *XpnResourceIdIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
209
vendor/cloud.google.com/go/compute/apiv1/public_advertised_prefixes_client.go
generated
vendored
209
vendor/cloud.google.com/go/compute/apiv1/public_advertised_prefixes_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -42,15 +42,20 @@ var newPublicAdvertisedPrefixesClientHook clientHook
|
|||
|
||||
// PublicAdvertisedPrefixesCallOptions contains the retry settings for each method of PublicAdvertisedPrefixesClient.
|
||||
type PublicAdvertisedPrefixesCallOptions struct {
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
Announce []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
Withdraw []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultPublicAdvertisedPrefixesRESTCallOptions() *PublicAdvertisedPrefixesCallOptions {
|
||||
return &PublicAdvertisedPrefixesCallOptions{
|
||||
Announce: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Delete: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -84,6 +89,9 @@ func defaultPublicAdvertisedPrefixesRESTCallOptions() *PublicAdvertisedPrefixesC
|
|||
Patch: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Withdraw: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -92,11 +100,13 @@ type internalPublicAdvertisedPrefixesClient interface {
|
|||
Close() error
|
||||
setGoogleClientInfo(...string)
|
||||
Connection() *grpc.ClientConn
|
||||
Announce(context.Context, *computepb.AnnouncePublicAdvertisedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
Delete(context.Context, *computepb.DeletePublicAdvertisedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
Get(context.Context, *computepb.GetPublicAdvertisedPrefixeRequest, ...gax.CallOption) (*computepb.PublicAdvertisedPrefix, error)
|
||||
Insert(context.Context, *computepb.InsertPublicAdvertisedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListPublicAdvertisedPrefixesRequest, ...gax.CallOption) *PublicAdvertisedPrefixIterator
|
||||
Patch(context.Context, *computepb.PatchPublicAdvertisedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
Withdraw(context.Context, *computepb.WithdrawPublicAdvertisedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
// PublicAdvertisedPrefixesClient is a client for interacting with Google Compute Engine API.
|
||||
|
|
@ -134,6 +144,11 @@ func (c *PublicAdvertisedPrefixesClient) Connection() *grpc.ClientConn {
|
|||
return c.internalClient.Connection()
|
||||
}
|
||||
|
||||
// Announce announces the specified PublicAdvertisedPrefix
|
||||
func (c *PublicAdvertisedPrefixesClient) Announce(ctx context.Context, req *computepb.AnnouncePublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Announce(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Delete deletes the specified PublicAdvertisedPrefix
|
||||
func (c *PublicAdvertisedPrefixesClient) Delete(ctx context.Context, req *computepb.DeletePublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Delete(ctx, req, opts...)
|
||||
|
|
@ -159,6 +174,11 @@ func (c *PublicAdvertisedPrefixesClient) Patch(ctx context.Context, req *compute
|
|||
return c.internalClient.Patch(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Withdraw withdraws the specified PublicAdvertisedPrefix
|
||||
func (c *PublicAdvertisedPrefixesClient) Withdraw(ctx context.Context, req *computepb.WithdrawPublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Withdraw(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
type publicAdvertisedPrefixesRESTClient struct {
|
||||
// The http endpoint to connect to.
|
||||
|
|
@ -211,7 +231,9 @@ func NewPublicAdvertisedPrefixesRESTClient(ctx context.Context, opts ...option.C
|
|||
func defaultPublicAdvertisedPrefixesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -244,6 +266,75 @@ func (c *publicAdvertisedPrefixesRESTClient) Connection() *grpc.ClientConn {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Announce announces the specified PublicAdvertisedPrefix
|
||||
func (c *publicAdvertisedPrefixesRESTClient) Announce(ctx context.Context, req *computepb.AnnouncePublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/publicAdvertisedPrefixes/%v/announce", req.GetProject(), req.GetPublicAdvertisedPrefix())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
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&%s=%v", "project", url.QueryEscape(req.GetProject()), "public_advertised_prefix", url.QueryEscape(req.GetPublicAdvertisedPrefix()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).Announce[0:len((*c.CallOptions).Announce):len((*c.CallOptions).Announce)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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(), 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
|
||||
}
|
||||
op := &Operation{
|
||||
&globalOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// Delete deletes the specified PublicAdvertisedPrefix
|
||||
func (c *publicAdvertisedPrefixesRESTClient) Delete(ctx context.Context, req *computepb.DeletePublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
|
|
@ -617,49 +708,71 @@ func (c *publicAdvertisedPrefixesRESTClient) Patch(ctx context.Context, req *com
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// PublicAdvertisedPrefixIterator manages a stream of *computepb.PublicAdvertisedPrefix.
|
||||
type PublicAdvertisedPrefixIterator struct {
|
||||
items []*computepb.PublicAdvertisedPrefix
|
||||
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 []*computepb.PublicAdvertisedPrefix, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *PublicAdvertisedPrefixIterator) 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 *PublicAdvertisedPrefixIterator) Next() (*computepb.PublicAdvertisedPrefix, error) {
|
||||
var item *computepb.PublicAdvertisedPrefix
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
// Withdraw withdraws the specified PublicAdvertisedPrefix
|
||||
func (c *publicAdvertisedPrefixesRESTClient) Withdraw(ctx context.Context, req *computepb.WithdrawPublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/publicAdvertisedPrefixes/%v/withdraw", req.GetProject(), req.GetPublicAdvertisedPrefix())
|
||||
|
||||
func (it *PublicAdvertisedPrefixIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
|
||||
}
|
||||
|
||||
func (it *PublicAdvertisedPrefixIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "public_advertised_prefix", url.QueryEscape(req.GetPublicAdvertisedPrefix()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).Withdraw[0:len((*c.CallOptions).Withdraw):len((*c.CallOptions).Withdraw)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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(), 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
|
||||
}
|
||||
op := &Operation{
|
||||
&globalOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
|
|
|||
210
vendor/cloud.google.com/go/compute/apiv1/public_delegated_prefixes_client.go
generated
vendored
210
vendor/cloud.google.com/go/compute/apiv1/public_delegated_prefixes_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -44,11 +44,13 @@ var newPublicDelegatedPrefixesClientHook clientHook
|
|||
// PublicDelegatedPrefixesCallOptions contains the retry settings for each method of PublicDelegatedPrefixesClient.
|
||||
type PublicDelegatedPrefixesCallOptions struct {
|
||||
AggregatedList []gax.CallOption
|
||||
Announce []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
Withdraw []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultPublicDelegatedPrefixesRESTCallOptions() *PublicDelegatedPrefixesCallOptions {
|
||||
|
|
@ -65,6 +67,9 @@ func defaultPublicDelegatedPrefixesRESTCallOptions() *PublicDelegatedPrefixesCal
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Announce: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Delete: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -98,6 +103,9 @@ func defaultPublicDelegatedPrefixesRESTCallOptions() *PublicDelegatedPrefixesCal
|
|||
Patch: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Withdraw: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -107,11 +115,13 @@ type internalPublicDelegatedPrefixesClient interface {
|
|||
setGoogleClientInfo(...string)
|
||||
Connection() *grpc.ClientConn
|
||||
AggregatedList(context.Context, *computepb.AggregatedListPublicDelegatedPrefixesRequest, ...gax.CallOption) *PublicDelegatedPrefixesScopedListPairIterator
|
||||
Announce(context.Context, *computepb.AnnouncePublicDelegatedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
Delete(context.Context, *computepb.DeletePublicDelegatedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
Get(context.Context, *computepb.GetPublicDelegatedPrefixeRequest, ...gax.CallOption) (*computepb.PublicDelegatedPrefix, error)
|
||||
Insert(context.Context, *computepb.InsertPublicDelegatedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListPublicDelegatedPrefixesRequest, ...gax.CallOption) *PublicDelegatedPrefixIterator
|
||||
Patch(context.Context, *computepb.PatchPublicDelegatedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
Withdraw(context.Context, *computepb.WithdrawPublicDelegatedPrefixeRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
// PublicDelegatedPrefixesClient is a client for interacting with Google Compute Engine API.
|
||||
|
|
@ -154,6 +164,11 @@ func (c *PublicDelegatedPrefixesClient) AggregatedList(ctx context.Context, req
|
|||
return c.internalClient.AggregatedList(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Announce announces the specified PublicDelegatedPrefix in the given region.
|
||||
func (c *PublicDelegatedPrefixesClient) Announce(ctx context.Context, req *computepb.AnnouncePublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Announce(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Delete deletes the specified PublicDelegatedPrefix in the given region.
|
||||
func (c *PublicDelegatedPrefixesClient) Delete(ctx context.Context, req *computepb.DeletePublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Delete(ctx, req, opts...)
|
||||
|
|
@ -179,6 +194,11 @@ func (c *PublicDelegatedPrefixesClient) Patch(ctx context.Context, req *computep
|
|||
return c.internalClient.Patch(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Withdraw withdraws the specified PublicDelegatedPrefix in the given region.
|
||||
func (c *PublicDelegatedPrefixesClient) Withdraw(ctx context.Context, req *computepb.WithdrawPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Withdraw(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
type publicDelegatedPrefixesRESTClient struct {
|
||||
// The http endpoint to connect to.
|
||||
|
|
@ -231,7 +251,9 @@ func NewPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...option.Cl
|
|||
func defaultPublicDelegatedPrefixesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -304,6 +326,9 @@ func (c *publicDelegatedPrefixesRESTClient) AggregatedList(ctx context.Context,
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -371,6 +396,76 @@ func (c *publicDelegatedPrefixesRESTClient) AggregatedList(ctx context.Context,
|
|||
return it
|
||||
}
|
||||
|
||||
// Announce announces the specified PublicDelegatedPrefix in the given region.
|
||||
func (c *publicDelegatedPrefixesRESTClient) Announce(ctx context.Context, req *computepb.AnnouncePublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/publicDelegatedPrefixes/%v/announce", req.GetProject(), req.GetRegion(), req.GetPublicDelegatedPrefix())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
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&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "public_delegated_prefix", url.QueryEscape(req.GetPublicDelegatedPrefix()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).Announce[0:len((*c.CallOptions).Announce):len((*c.CallOptions).Announce)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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(), 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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// Delete deletes the specified PublicDelegatedPrefix in the given region.
|
||||
func (c *publicDelegatedPrefixesRESTClient) Delete(ctx context.Context, req *computepb.DeletePublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
|
|
@ -747,55 +842,72 @@ func (c *publicDelegatedPrefixesRESTClient) Patch(ctx context.Context, req *comp
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// PublicDelegatedPrefixesScopedListPair is a holder type for string/*computepb.PublicDelegatedPrefixesScopedList map entries
|
||||
type PublicDelegatedPrefixesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.PublicDelegatedPrefixesScopedList
|
||||
}
|
||||
|
||||
// PublicDelegatedPrefixesScopedListPairIterator manages a stream of PublicDelegatedPrefixesScopedListPair.
|
||||
type PublicDelegatedPrefixesScopedListPairIterator struct {
|
||||
items []PublicDelegatedPrefixesScopedListPair
|
||||
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 []PublicDelegatedPrefixesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *PublicDelegatedPrefixesScopedListPairIterator) 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 *PublicDelegatedPrefixesScopedListPairIterator) Next() (PublicDelegatedPrefixesScopedListPair, error) {
|
||||
var item PublicDelegatedPrefixesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
// Withdraw withdraws the specified PublicDelegatedPrefix in the given region.
|
||||
func (c *publicDelegatedPrefixesRESTClient) Withdraw(ctx context.Context, req *computepb.WithdrawPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/publicDelegatedPrefixes/%v/withdraw", req.GetProject(), req.GetRegion(), req.GetPublicDelegatedPrefix())
|
||||
|
||||
func (it *PublicDelegatedPrefixesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
|
||||
}
|
||||
|
||||
func (it *PublicDelegatedPrefixesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "public_delegated_prefix", url.QueryEscape(req.GetPublicDelegatedPrefix()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).Withdraw[0:len((*c.CallOptions).Withdraw):len((*c.CallOptions).Withdraw)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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(), 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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_autoscalers_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_autoscalers_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -221,7 +221,9 @@ func NewRegionAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOp
|
|||
func defaultRegionAutoscalersRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
297
vendor/cloud.google.com/go/compute/apiv1/region_backend_services_client.go
generated
vendored
297
vendor/cloud.google.com/go/compute/apiv1/region_backend_services_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -42,15 +42,18 @@ var newRegionBackendServicesClientHook clientHook
|
|||
|
||||
// RegionBackendServicesCallOptions contains the retry settings for each method of RegionBackendServicesClient.
|
||||
type RegionBackendServicesCallOptions struct {
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
GetHealth []gax.CallOption
|
||||
GetIamPolicy []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
SetIamPolicy []gax.CallOption
|
||||
Update []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
GetHealth []gax.CallOption
|
||||
GetIamPolicy []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
ListUsable []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
SetIamPolicy []gax.CallOption
|
||||
SetSecurityPolicy []gax.CallOption
|
||||
TestIamPermissions []gax.CallOption
|
||||
Update []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultRegionBackendServicesRESTCallOptions() *RegionBackendServicesCallOptions {
|
||||
|
|
@ -100,12 +103,30 @@ func defaultRegionBackendServicesRESTCallOptions() *RegionBackendServicesCallOpt
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
ListUsable: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnHTTPCodes(gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.30,
|
||||
},
|
||||
http.StatusGatewayTimeout,
|
||||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Patch: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
SetIamPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
SetSecurityPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
TestIamPermissions: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Update: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -123,8 +144,11 @@ type internalRegionBackendServicesClient interface {
|
|||
GetIamPolicy(context.Context, *computepb.GetIamPolicyRegionBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
Insert(context.Context, *computepb.InsertRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListRegionBackendServicesRequest, ...gax.CallOption) *BackendServiceIterator
|
||||
ListUsable(context.Context, *computepb.ListUsableRegionBackendServicesRequest, ...gax.CallOption) *BackendServiceIterator
|
||||
Patch(context.Context, *computepb.PatchRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetIamPolicy(context.Context, *computepb.SetIamPolicyRegionBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error)
|
||||
SetSecurityPolicy(context.Context, *computepb.SetSecurityPolicyRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
TestIamPermissions(context.Context, *computepb.TestIamPermissionsRegionBackendServiceRequest, ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
|
||||
Update(context.Context, *computepb.UpdateRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
|
|
@ -193,6 +217,11 @@ func (c *RegionBackendServicesClient) List(ctx context.Context, req *computepb.L
|
|||
return c.internalClient.List(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// ListUsable retrieves an aggregated list of all usable backend services in the specified project in the given region.
|
||||
func (c *RegionBackendServicesClient) ListUsable(ctx context.Context, req *computepb.ListUsableRegionBackendServicesRequest, opts ...gax.CallOption) *BackendServiceIterator {
|
||||
return c.internalClient.ListUsable(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Patch updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
|
||||
func (c *RegionBackendServicesClient) Patch(ctx context.Context, req *computepb.PatchRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Patch(ctx, req, opts...)
|
||||
|
|
@ -203,6 +232,16 @@ func (c *RegionBackendServicesClient) SetIamPolicy(ctx context.Context, req *com
|
|||
return c.internalClient.SetIamPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
|
||||
func (c *RegionBackendServicesClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.SetSecurityPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// TestIamPermissions returns permissions that a caller has on the specified resource.
|
||||
func (c *RegionBackendServicesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error) {
|
||||
return c.internalClient.TestIamPermissions(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Update updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview .
|
||||
func (c *RegionBackendServicesClient) Update(ctx context.Context, req *computepb.UpdateRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Update(ctx, req, opts...)
|
||||
|
|
@ -260,7 +299,9 @@ func NewRegionBackendServicesRESTClient(ctx context.Context, opts ...option.Clie
|
|||
func defaultRegionBackendServicesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -716,6 +757,103 @@ func (c *regionBackendServicesRESTClient) List(ctx context.Context, req *compute
|
|||
return it
|
||||
}
|
||||
|
||||
// ListUsable retrieves an aggregated list of all usable backend services in the specified project in the given region.
|
||||
func (c *regionBackendServicesRESTClient) ListUsable(ctx context.Context, req *computepb.ListUsableRegionBackendServicesRequest, opts ...gax.CallOption) *BackendServiceIterator {
|
||||
it := &BackendServiceIterator{}
|
||||
req = proto.Clone(req).(*computepb.ListUsableRegionBackendServicesRequest)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
it.InternalFetch = func(pageSize int, pageToken string) ([]*computepb.BackendService, string, error) {
|
||||
resp := &computepb.BackendServiceListUsable{}
|
||||
if pageToken != "" {
|
||||
req.PageToken = proto.String(pageToken)
|
||||
}
|
||||
if pageSize > math.MaxInt32 {
|
||||
req.MaxResults = proto.Uint32(math.MaxInt32)
|
||||
} else if pageSize != 0 {
|
||||
req.MaxResults = proto.Uint32(uint32(pageSize))
|
||||
}
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/backendServices/listUsable", req.GetProject(), req.GetRegion())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.Filter != nil {
|
||||
params.Add("filter", fmt.Sprintf("%v", req.GetFilter()))
|
||||
}
|
||||
if req != nil && req.MaxResults != nil {
|
||||
params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults()))
|
||||
}
|
||||
if req != nil && req.OrderBy != nil {
|
||||
params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy()))
|
||||
}
|
||||
if req != nil && req.PageToken != nil {
|
||||
params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken()))
|
||||
}
|
||||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
|
||||
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.GetItems(), 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.GetMaxResults())
|
||||
it.pageInfo.Token = req.GetPageToken()
|
||||
|
||||
return it
|
||||
}
|
||||
|
||||
// Patch updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
|
||||
func (c *regionBackendServicesRESTClient) Patch(ctx context.Context, req *computepb.PatchRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -855,6 +993,145 @@ func (c *regionBackendServicesRESTClient) SetIamPolicy(ctx context.Context, req
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
|
||||
func (c *regionBackendServicesRESTClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetSecurityPolicyReferenceResource()
|
||||
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("/compute/v1/projects/%v/regions/%v/backendServices/%v/setSecurityPolicy", req.GetProject(), req.GetRegion(), req.GetBackendService())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
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&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "backend_service", url.QueryEscape(req.GetBackendService()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).SetSecurityPolicy[0:len((*c.CallOptions).SetSecurityPolicy):len((*c.CallOptions).SetSecurityPolicy)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TestIamPermissions returns permissions that a caller has on the specified resource.
|
||||
func (c *regionBackendServicesRESTClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetTestPermissionsRequestResource()
|
||||
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("/compute/v1/projects/%v/regions/%v/backendServices/%v/testIamPermissions", req.GetProject(), req.GetRegion(), req.GetResource())
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "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 := &computepb.TestPermissionsResponse{}
|
||||
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
|
||||
}
|
||||
|
||||
// Update updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview .
|
||||
func (c *regionBackendServicesRESTClient) Update(ctx context.Context, req *computepb.UpdateRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/region_commitments_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/region_commitments_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -221,7 +221,9 @@ func NewRegionCommitmentsRESTClient(ctx context.Context, opts ...option.ClientOp
|
|||
func defaultRegionCommitmentsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -294,6 +296,9 @@ func (c *regionCommitmentsRESTClient) AggregatedList(ctx context.Context, req *c
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -672,103 +677,3 @@ func (c *regionCommitmentsRESTClient) Update(ctx context.Context, req *computepb
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// CommitmentIterator manages a stream of *computepb.Commitment.
|
||||
type CommitmentIterator struct {
|
||||
items []*computepb.Commitment
|
||||
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 []*computepb.Commitment, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *CommitmentIterator) 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 *CommitmentIterator) Next() (*computepb.Commitment, error) {
|
||||
var item *computepb.Commitment
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *CommitmentIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *CommitmentIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// CommitmentsScopedListPair is a holder type for string/*computepb.CommitmentsScopedList map entries
|
||||
type CommitmentsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.CommitmentsScopedList
|
||||
}
|
||||
|
||||
// CommitmentsScopedListPairIterator manages a stream of CommitmentsScopedListPair.
|
||||
type CommitmentsScopedListPairIterator struct {
|
||||
items []CommitmentsScopedListPair
|
||||
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 []CommitmentsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *CommitmentsScopedListPairIterator) 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 *CommitmentsScopedListPairIterator) Next() (CommitmentsScopedListPair, error) {
|
||||
var item CommitmentsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *CommitmentsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *CommitmentsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_disk_types_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_disk_types_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -167,7 +167,9 @@ func NewRegionDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOpti
|
|||
func defaultRegionDiskTypesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_disks_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_disks_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -340,7 +340,9 @@ func NewRegionDisksRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultRegionDisksRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_health_check_services_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_health_check_services_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -211,7 +211,9 @@ func NewRegionHealthCheckServicesRESTClient(ctx context.Context, opts ...option.
|
|||
func defaultRegionHealthCheckServicesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -619,50 +621,3 @@ func (c *regionHealthCheckServicesRESTClient) Patch(ctx context.Context, req *co
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// HealthCheckServiceIterator manages a stream of *computepb.HealthCheckService.
|
||||
type HealthCheckServiceIterator struct {
|
||||
items []*computepb.HealthCheckService
|
||||
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 []*computepb.HealthCheckService, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *HealthCheckServiceIterator) 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 *HealthCheckServiceIterator) Next() (*computepb.HealthCheckService, error) {
|
||||
var item *computepb.HealthCheckService
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *HealthCheckServiceIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *HealthCheckServiceIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_health_checks_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_health_checks_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -221,7 +221,9 @@ func NewRegionHealthChecksRESTClient(ctx context.Context, opts ...option.ClientO
|
|||
func defaultRegionHealthChecksRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_instance_group_managers_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_instance_group_managers_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -360,7 +360,9 @@ func NewRegionInstanceGroupManagersRESTClient(ctx context.Context, opts ...optio
|
|||
func defaultRegionInstanceGroupManagersRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_instance_groups_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_instance_groups_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -201,7 +201,9 @@ func NewRegionInstanceGroupsRESTClient(ctx context.Context, opts ...option.Clien
|
|||
func defaultRegionInstanceGroupsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_instance_templates_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_instance_templates_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -201,7 +201,9 @@ func NewRegionInstanceTemplatesRESTClient(ctx context.Context, opts ...option.Cl
|
|||
func defaultRegionInstanceTemplatesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_instances_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_instances_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -150,7 +150,9 @@ func NewRegionInstancesRESTClient(ctx context.Context, opts ...option.ClientOpti
|
|||
func defaultRegionInstancesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
293
vendor/cloud.google.com/go/compute/apiv1/region_network_endpoint_groups_client.go
generated
vendored
293
vendor/cloud.google.com/go/compute/apiv1/region_network_endpoint_groups_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -42,17 +42,26 @@ var newRegionNetworkEndpointGroupsClientHook clientHook
|
|||
|
||||
// RegionNetworkEndpointGroupsCallOptions contains the retry settings for each method of RegionNetworkEndpointGroupsClient.
|
||||
type RegionNetworkEndpointGroupsCallOptions struct {
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
AttachNetworkEndpoints []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
DetachNetworkEndpoints []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
ListNetworkEndpoints []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultRegionNetworkEndpointGroupsRESTCallOptions() *RegionNetworkEndpointGroupsCallOptions {
|
||||
return &RegionNetworkEndpointGroupsCallOptions{
|
||||
AttachNetworkEndpoints: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Delete: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
DetachNetworkEndpoints: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Get: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
|
|
@ -80,6 +89,9 @@ func defaultRegionNetworkEndpointGroupsRESTCallOptions() *RegionNetworkEndpointG
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
ListNetworkEndpoints: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,10 +100,13 @@ type internalRegionNetworkEndpointGroupsClient interface {
|
|||
Close() error
|
||||
setGoogleClientInfo(...string)
|
||||
Connection() *grpc.ClientConn
|
||||
AttachNetworkEndpoints(context.Context, *computepb.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest, ...gax.CallOption) (*Operation, error)
|
||||
Delete(context.Context, *computepb.DeleteRegionNetworkEndpointGroupRequest, ...gax.CallOption) (*Operation, error)
|
||||
DetachNetworkEndpoints(context.Context, *computepb.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest, ...gax.CallOption) (*Operation, error)
|
||||
Get(context.Context, *computepb.GetRegionNetworkEndpointGroupRequest, ...gax.CallOption) (*computepb.NetworkEndpointGroup, error)
|
||||
Insert(context.Context, *computepb.InsertRegionNetworkEndpointGroupRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListRegionNetworkEndpointGroupsRequest, ...gax.CallOption) *NetworkEndpointGroupIterator
|
||||
ListNetworkEndpoints(context.Context, *computepb.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest, ...gax.CallOption) *NetworkEndpointWithHealthStatusIterator
|
||||
}
|
||||
|
||||
// RegionNetworkEndpointGroupsClient is a client for interacting with Google Compute Engine API.
|
||||
|
|
@ -129,11 +144,21 @@ func (c *RegionNetworkEndpointGroupsClient) Connection() *grpc.ClientConn {
|
|||
return c.internalClient.Connection()
|
||||
}
|
||||
|
||||
// AttachNetworkEndpoints attach a list of network endpoints to the specified network endpoint group.
|
||||
func (c *RegionNetworkEndpointGroupsClient) AttachNetworkEndpoints(ctx context.Context, req *computepb.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.AttachNetworkEndpoints(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Delete deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.
|
||||
func (c *RegionNetworkEndpointGroupsClient) Delete(ctx context.Context, req *computepb.DeleteRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Delete(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// DetachNetworkEndpoints detach the network endpoint from the specified network endpoint group.
|
||||
func (c *RegionNetworkEndpointGroupsClient) DetachNetworkEndpoints(ctx context.Context, req *computepb.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.DetachNetworkEndpoints(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Get returns the specified network endpoint group.
|
||||
func (c *RegionNetworkEndpointGroupsClient) Get(ctx context.Context, req *computepb.GetRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroup, error) {
|
||||
return c.internalClient.Get(ctx, req, opts...)
|
||||
|
|
@ -149,6 +174,11 @@ func (c *RegionNetworkEndpointGroupsClient) List(ctx context.Context, req *compu
|
|||
return c.internalClient.List(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// ListNetworkEndpoints lists the network endpoints in the specified network endpoint group.
|
||||
func (c *RegionNetworkEndpointGroupsClient) ListNetworkEndpoints(ctx context.Context, req *computepb.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest, opts ...gax.CallOption) *NetworkEndpointWithHealthStatusIterator {
|
||||
return c.internalClient.ListNetworkEndpoints(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
type regionNetworkEndpointGroupsRESTClient struct {
|
||||
// The http endpoint to connect to.
|
||||
|
|
@ -201,7 +231,9 @@ func NewRegionNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...optio
|
|||
func defaultRegionNetworkEndpointGroupsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -234,6 +266,83 @@ func (c *regionNetworkEndpointGroupsRESTClient) Connection() *grpc.ClientConn {
|
|||
return nil
|
||||
}
|
||||
|
||||
// AttachNetworkEndpoints attach a list of network endpoints to the specified network endpoint group.
|
||||
func (c *regionNetworkEndpointGroupsRESTClient) AttachNetworkEndpoints(ctx context.Context, req *computepb.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetRegionNetworkEndpointGroupsAttachEndpointsRequestResource()
|
||||
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("/compute/v1/projects/%v/regions/%v/networkEndpointGroups/%v/attachNetworkEndpoints", req.GetProject(), req.GetRegion(), req.GetNetworkEndpointGroup())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
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&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "network_endpoint_group", url.QueryEscape(req.GetNetworkEndpointGroup()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).AttachNetworkEndpoints[0:len((*c.CallOptions).AttachNetworkEndpoints):len((*c.CallOptions).AttachNetworkEndpoints)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// Delete deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.
|
||||
func (c *regionNetworkEndpointGroupsRESTClient) Delete(ctx context.Context, req *computepb.DeleteRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
|
|
@ -304,6 +413,83 @@ func (c *regionNetworkEndpointGroupsRESTClient) Delete(ctx context.Context, req
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// DetachNetworkEndpoints detach the network endpoint from the specified network endpoint group.
|
||||
func (c *regionNetworkEndpointGroupsRESTClient) DetachNetworkEndpoints(ctx context.Context, req *computepb.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetRegionNetworkEndpointGroupsDetachEndpointsRequestResource()
|
||||
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("/compute/v1/projects/%v/regions/%v/networkEndpointGroups/%v/detachNetworkEndpoints", req.GetProject(), req.GetRegion(), req.GetNetworkEndpointGroup())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
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&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "network_endpoint_group", url.QueryEscape(req.GetNetworkEndpointGroup()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).DetachNetworkEndpoints[0:len((*c.CallOptions).DetachNetworkEndpoints):len((*c.CallOptions).DetachNetworkEndpoints)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// Get returns the specified network endpoint group.
|
||||
func (c *regionNetworkEndpointGroupsRESTClient) Get(ctx context.Context, req *computepb.GetRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroup, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
|
|
@ -532,3 +718,100 @@ func (c *regionNetworkEndpointGroupsRESTClient) List(ctx context.Context, req *c
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// ListNetworkEndpoints lists the network endpoints in the specified network endpoint group.
|
||||
func (c *regionNetworkEndpointGroupsRESTClient) ListNetworkEndpoints(ctx context.Context, req *computepb.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest, opts ...gax.CallOption) *NetworkEndpointWithHealthStatusIterator {
|
||||
it := &NetworkEndpointWithHealthStatusIterator{}
|
||||
req = proto.Clone(req).(*computepb.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
it.InternalFetch = func(pageSize int, pageToken string) ([]*computepb.NetworkEndpointWithHealthStatus, string, error) {
|
||||
resp := &computepb.NetworkEndpointGroupsListNetworkEndpoints{}
|
||||
if pageToken != "" {
|
||||
req.PageToken = proto.String(pageToken)
|
||||
}
|
||||
if pageSize > math.MaxInt32 {
|
||||
req.MaxResults = proto.Uint32(math.MaxInt32)
|
||||
} else if pageSize != 0 {
|
||||
req.MaxResults = proto.Uint32(uint32(pageSize))
|
||||
}
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/networkEndpointGroups/%v/listNetworkEndpoints", req.GetProject(), req.GetRegion(), req.GetNetworkEndpointGroup())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.Filter != nil {
|
||||
params.Add("filter", fmt.Sprintf("%v", req.GetFilter()))
|
||||
}
|
||||
if req != nil && req.MaxResults != nil {
|
||||
params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults()))
|
||||
}
|
||||
if req != nil && req.OrderBy != nil {
|
||||
params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy()))
|
||||
}
|
||||
if req != nil && req.PageToken != nil {
|
||||
params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken()))
|
||||
}
|
||||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
|
||||
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("POST", 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.GetItems(), 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.GetMaxResults())
|
||||
it.pageInfo.Token = req.GetPageToken()
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_network_firewall_policies_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_network_firewall_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -367,7 +367,9 @@ func NewRegionNetworkFirewallPoliciesRESTClient(ctx context.Context, opts ...opt
|
|||
func defaultRegionNetworkFirewallPoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_notification_endpoints_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_notification_endpoints_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -201,7 +201,9 @@ func NewRegionNotificationEndpointsRESTClient(ctx context.Context, opts ...optio
|
|||
func defaultRegionNotificationEndpointsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -532,50 +534,3 @@ func (c *regionNotificationEndpointsRESTClient) List(ctx context.Context, req *c
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// NotificationEndpointIterator manages a stream of *computepb.NotificationEndpoint.
|
||||
type NotificationEndpointIterator struct {
|
||||
items []*computepb.NotificationEndpoint
|
||||
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 []*computepb.NotificationEndpoint, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *NotificationEndpointIterator) 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 *NotificationEndpointIterator) Next() (*computepb.NotificationEndpoint, error) {
|
||||
var item *computepb.NotificationEndpoint
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *NotificationEndpointIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *NotificationEndpointIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/region_operations_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/region_operations_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -187,7 +187,9 @@ func NewRegionOperationsRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultRegionOperationsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
393
vendor/cloud.google.com/go/compute/apiv1/region_security_policies_client.go
generated
vendored
393
vendor/cloud.google.com/go/compute/apiv1/region_security_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -42,15 +42,22 @@ var newRegionSecurityPoliciesClientHook clientHook
|
|||
|
||||
// RegionSecurityPoliciesCallOptions contains the retry settings for each method of RegionSecurityPoliciesClient.
|
||||
type RegionSecurityPoliciesCallOptions struct {
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
AddRule []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
GetRule []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
PatchRule []gax.CallOption
|
||||
RemoveRule []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultRegionSecurityPoliciesRESTCallOptions() *RegionSecurityPoliciesCallOptions {
|
||||
return &RegionSecurityPoliciesCallOptions{
|
||||
AddRule: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
Delete: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -66,6 +73,18 @@ func defaultRegionSecurityPoliciesRESTCallOptions() *RegionSecurityPoliciesCallO
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
GetRule: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnHTTPCodes(gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.30,
|
||||
},
|
||||
http.StatusGatewayTimeout,
|
||||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Insert: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
|
|
@ -84,6 +103,12 @@ func defaultRegionSecurityPoliciesRESTCallOptions() *RegionSecurityPoliciesCallO
|
|||
Patch: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
PatchRule: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
RemoveRule: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -92,11 +117,15 @@ type internalRegionSecurityPoliciesClient interface {
|
|||
Close() error
|
||||
setGoogleClientInfo(...string)
|
||||
Connection() *grpc.ClientConn
|
||||
AddRule(context.Context, *computepb.AddRuleRegionSecurityPolicyRequest, ...gax.CallOption) (*Operation, error)
|
||||
Delete(context.Context, *computepb.DeleteRegionSecurityPolicyRequest, ...gax.CallOption) (*Operation, error)
|
||||
Get(context.Context, *computepb.GetRegionSecurityPolicyRequest, ...gax.CallOption) (*computepb.SecurityPolicy, error)
|
||||
GetRule(context.Context, *computepb.GetRuleRegionSecurityPolicyRequest, ...gax.CallOption) (*computepb.SecurityPolicyRule, error)
|
||||
Insert(context.Context, *computepb.InsertRegionSecurityPolicyRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListRegionSecurityPoliciesRequest, ...gax.CallOption) *SecurityPolicyIterator
|
||||
Patch(context.Context, *computepb.PatchRegionSecurityPolicyRequest, ...gax.CallOption) (*Operation, error)
|
||||
PatchRule(context.Context, *computepb.PatchRuleRegionSecurityPolicyRequest, ...gax.CallOption) (*Operation, error)
|
||||
RemoveRule(context.Context, *computepb.RemoveRuleRegionSecurityPolicyRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
// RegionSecurityPoliciesClient is a client for interacting with Google Compute Engine API.
|
||||
|
|
@ -134,6 +163,11 @@ func (c *RegionSecurityPoliciesClient) Connection() *grpc.ClientConn {
|
|||
return c.internalClient.Connection()
|
||||
}
|
||||
|
||||
// AddRule inserts a rule into a security policy.
|
||||
func (c *RegionSecurityPoliciesClient) AddRule(ctx context.Context, req *computepb.AddRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.AddRule(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Delete deletes the specified policy.
|
||||
func (c *RegionSecurityPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Delete(ctx, req, opts...)
|
||||
|
|
@ -144,6 +178,11 @@ func (c *RegionSecurityPoliciesClient) Get(ctx context.Context, req *computepb.G
|
|||
return c.internalClient.Get(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// GetRule gets a rule at the specified priority.
|
||||
func (c *RegionSecurityPoliciesClient) GetRule(ctx context.Context, req *computepb.GetRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.SecurityPolicyRule, error) {
|
||||
return c.internalClient.GetRule(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Insert creates a new policy in the specified project using the data included in the request.
|
||||
func (c *RegionSecurityPoliciesClient) Insert(ctx context.Context, req *computepb.InsertRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Insert(ctx, req, opts...)
|
||||
|
|
@ -159,6 +198,16 @@ func (c *RegionSecurityPoliciesClient) Patch(ctx context.Context, req *computepb
|
|||
return c.internalClient.Patch(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// PatchRule patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.
|
||||
func (c *RegionSecurityPoliciesClient) PatchRule(ctx context.Context, req *computepb.PatchRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.PatchRule(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// RemoveRule deletes a rule at the specified priority.
|
||||
func (c *RegionSecurityPoliciesClient) RemoveRule(ctx context.Context, req *computepb.RemoveRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.RemoveRule(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
type regionSecurityPoliciesRESTClient struct {
|
||||
// The http endpoint to connect to.
|
||||
|
|
@ -211,7 +260,9 @@ func NewRegionSecurityPoliciesRESTClient(ctx context.Context, opts ...option.Cli
|
|||
func defaultRegionSecurityPoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -244,6 +295,83 @@ func (c *regionSecurityPoliciesRESTClient) Connection() *grpc.ClientConn {
|
|||
return nil
|
||||
}
|
||||
|
||||
// AddRule inserts a rule into a security policy.
|
||||
func (c *regionSecurityPoliciesRESTClient) AddRule(ctx context.Context, req *computepb.AddRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetSecurityPolicyRuleResource()
|
||||
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("/compute/v1/projects/%v/regions/%v/securityPolicies/%v/addRule", req.GetProject(), req.GetRegion(), req.GetSecurityPolicy())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.ValidateOnly != nil {
|
||||
params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "security_policy", url.QueryEscape(req.GetSecurityPolicy()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).AddRule[0:len((*c.CallOptions).AddRule):len((*c.CallOptions).AddRule)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// Delete deletes the specified policy.
|
||||
func (c *regionSecurityPoliciesRESTClient) Delete(ctx context.Context, req *computepb.DeleteRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
|
|
@ -369,6 +497,68 @@ func (c *regionSecurityPoliciesRESTClient) Get(ctx context.Context, req *compute
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
// GetRule gets a rule at the specified priority.
|
||||
func (c *regionSecurityPoliciesRESTClient) GetRule(ctx context.Context, req *computepb.GetRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.SecurityPolicyRule, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/securityPolicies/%v/getRule", req.GetProject(), req.GetRegion(), req.GetSecurityPolicy())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.Priority != nil {
|
||||
params.Add("priority", fmt.Sprintf("%v", req.GetPriority()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "security_policy", url.QueryEscape(req.GetSecurityPolicy()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).GetRule[0:len((*c.CallOptions).GetRule):len((*c.CallOptions).GetRule)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.SecurityPolicyRule{}
|
||||
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
|
||||
}
|
||||
|
||||
// Insert creates a new policy in the specified project using the data included in the request.
|
||||
func (c *regionSecurityPoliciesRESTClient) Insert(ctx context.Context, req *computepb.InsertRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
|
|
@ -565,6 +755,9 @@ func (c *regionSecurityPoliciesRESTClient) Patch(ctx context.Context, req *compu
|
|||
if req != nil && req.RequestId != nil {
|
||||
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
|
||||
}
|
||||
if req != nil && req.UpdateMask != nil {
|
||||
params.Add("updateMask", fmt.Sprintf("%v", req.GetUpdateMask()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -623,49 +816,155 @@ func (c *regionSecurityPoliciesRESTClient) Patch(ctx context.Context, req *compu
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// SecurityPolicyIterator manages a stream of *computepb.SecurityPolicy.
|
||||
type SecurityPolicyIterator struct {
|
||||
items []*computepb.SecurityPolicy
|
||||
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 []*computepb.SecurityPolicy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SecurityPolicyIterator) 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 *SecurityPolicyIterator) Next() (*computepb.SecurityPolicy, error) {
|
||||
var item *computepb.SecurityPolicy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
// PatchRule patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.
|
||||
func (c *regionSecurityPoliciesRESTClient) PatchRule(ctx context.Context, req *computepb.PatchRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetSecurityPolicyRuleResource()
|
||||
jsonReq, err := m.Marshal(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/securityPolicies/%v/patchRule", req.GetProject(), req.GetRegion(), req.GetSecurityPolicy())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.Priority != nil {
|
||||
params.Add("priority", fmt.Sprintf("%v", req.GetPriority()))
|
||||
}
|
||||
if req != nil && req.UpdateMask != nil {
|
||||
params.Add("updateMask", fmt.Sprintf("%v", req.GetUpdateMask()))
|
||||
}
|
||||
if req != nil && req.ValidateOnly != nil {
|
||||
params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "security_policy", url.QueryEscape(req.GetSecurityPolicy()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).PatchRule[0:len((*c.CallOptions).PatchRule):len((*c.CallOptions).PatchRule)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
func (it *SecurityPolicyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
// RemoveRule deletes a rule at the specified priority.
|
||||
func (c *regionSecurityPoliciesRESTClient) RemoveRule(ctx context.Context, req *computepb.RemoveRuleRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/securityPolicies/%v/removeRule", req.GetProject(), req.GetRegion(), req.GetSecurityPolicy())
|
||||
|
||||
func (it *SecurityPolicyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
params := url.Values{}
|
||||
if req != nil && req.Priority != nil {
|
||||
params.Add("priority", fmt.Sprintf("%v", req.GetPriority()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "security_policy", url.QueryEscape(req.GetSecurityPolicy()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).RemoveRule[0:len((*c.CallOptions).RemoveRule):len((*c.CallOptions).RemoveRule)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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(), 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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_ssl_certificates_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_ssl_certificates_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -201,7 +201,9 @@ func NewRegionSslCertificatesRESTClient(ctx context.Context, opts ...option.Clie
|
|||
func defaultRegionSslCertificatesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -532,50 +534,3 @@ func (c *regionSslCertificatesRESTClient) List(ctx context.Context, req *compute
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// SslCertificateIterator manages a stream of *computepb.SslCertificate.
|
||||
type SslCertificateIterator struct {
|
||||
items []*computepb.SslCertificate
|
||||
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 []*computepb.SslCertificate, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SslCertificateIterator) 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 *SslCertificateIterator) Next() (*computepb.SslCertificate, error) {
|
||||
var item *computepb.SslCertificate
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SslCertificateIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SslCertificateIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_ssl_policies_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_ssl_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -230,7 +230,9 @@ func NewRegionSslPoliciesRESTClient(ctx context.Context, opts ...option.ClientOp
|
|||
func defaultRegionSslPoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -712,50 +714,3 @@ func (c *regionSslPoliciesRESTClient) Patch(ctx context.Context, req *computepb.
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// SslPolicyIterator manages a stream of *computepb.SslPolicy.
|
||||
type SslPolicyIterator struct {
|
||||
items []*computepb.SslPolicy
|
||||
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 []*computepb.SslPolicy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SslPolicyIterator) 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 *SslPolicyIterator) Next() (*computepb.SslPolicy, error) {
|
||||
var item *computepb.SslPolicy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SslPolicyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SslPolicyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_target_http_proxies_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_target_http_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -211,7 +211,9 @@ func NewRegionTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.Cl
|
|||
func defaultRegionTargetHttpProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -619,50 +621,3 @@ func (c *regionTargetHttpProxiesRESTClient) SetUrlMap(ctx context.Context, req *
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetHttpProxyIterator manages a stream of *computepb.TargetHttpProxy.
|
||||
type TargetHttpProxyIterator struct {
|
||||
items []*computepb.TargetHttpProxy
|
||||
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 []*computepb.TargetHttpProxy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetHttpProxyIterator) 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 *TargetHttpProxyIterator) Next() (*computepb.TargetHttpProxy, error) {
|
||||
var item *computepb.TargetHttpProxy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetHttpProxyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetHttpProxyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_target_https_proxies_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_target_https_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -231,7 +231,9 @@ func NewRegionTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.C
|
|||
func defaultRegionTargetHttpsProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -793,50 +795,3 @@ func (c *regionTargetHttpsProxiesRESTClient) SetUrlMap(ctx context.Context, req
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetHttpsProxyIterator manages a stream of *computepb.TargetHttpsProxy.
|
||||
type TargetHttpsProxyIterator struct {
|
||||
items []*computepb.TargetHttpsProxy
|
||||
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 []*computepb.TargetHttpsProxy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetHttpsProxyIterator) 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 *TargetHttpsProxyIterator) Next() (*computepb.TargetHttpsProxy, error) {
|
||||
var item *computepb.TargetHttpsProxy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetHttpsProxyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetHttpsProxyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_target_tcp_proxies_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_target_tcp_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -201,7 +201,9 @@ func NewRegionTargetTcpProxiesRESTClient(ctx context.Context, opts ...option.Cli
|
|||
func defaultRegionTargetTcpProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -532,50 +534,3 @@ func (c *regionTargetTcpProxiesRESTClient) List(ctx context.Context, req *comput
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// TargetTcpProxyIterator manages a stream of *computepb.TargetTcpProxy.
|
||||
type TargetTcpProxyIterator struct {
|
||||
items []*computepb.TargetTcpProxy
|
||||
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 []*computepb.TargetTcpProxy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetTcpProxyIterator) 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 *TargetTcpProxyIterator) Next() (*computepb.TargetTcpProxy, error) {
|
||||
var item *computepb.TargetTcpProxy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetTcpProxyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetTcpProxyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/region_url_maps_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/region_url_maps_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -231,7 +231,9 @@ func NewRegionUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption
|
|||
func defaultRegionUrlMapsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -778,50 +780,3 @@ func (c *regionUrlMapsRESTClient) Validate(ctx context.Context, req *computepb.V
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// UrlMapIterator manages a stream of *computepb.UrlMap.
|
||||
type UrlMapIterator struct {
|
||||
items []*computepb.UrlMap
|
||||
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 []*computepb.UrlMap, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *UrlMapIterator) 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 *UrlMapIterator) Next() (*computepb.UrlMap, error) {
|
||||
var item *computepb.UrlMap
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *UrlMapIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *UrlMapIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/regions_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/regions_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -167,7 +167,9 @@ func NewRegionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Re
|
|||
func defaultRegionsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -348,50 +350,3 @@ func (c *regionsRESTClient) List(ctx context.Context, req *computepb.ListRegions
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// RegionIterator manages a stream of *computepb.Region.
|
||||
type RegionIterator struct {
|
||||
items []*computepb.Region
|
||||
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 []*computepb.Region, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *RegionIterator) 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 *RegionIterator) Next() (*computepb.Region, error) {
|
||||
var item *computepb.Region
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *RegionIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *RegionIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/reservations_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/reservations_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -280,7 +280,9 @@ func NewReservationsRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultReservationsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -353,6 +355,9 @@ func (c *reservationsRESTClient) AggregatedList(ctx context.Context, req *comput
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1064,103 +1069,3 @@ func (c *reservationsRESTClient) Update(ctx context.Context, req *computepb.Upda
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// ReservationIterator manages a stream of *computepb.Reservation.
|
||||
type ReservationIterator struct {
|
||||
items []*computepb.Reservation
|
||||
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 []*computepb.Reservation, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ReservationIterator) 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 *ReservationIterator) Next() (*computepb.Reservation, error) {
|
||||
var item *computepb.Reservation
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ReservationIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ReservationIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// ReservationsScopedListPair is a holder type for string/*computepb.ReservationsScopedList map entries
|
||||
type ReservationsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.ReservationsScopedList
|
||||
}
|
||||
|
||||
// ReservationsScopedListPairIterator manages a stream of ReservationsScopedListPair.
|
||||
type ReservationsScopedListPairIterator struct {
|
||||
items []ReservationsScopedListPair
|
||||
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 []ReservationsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ReservationsScopedListPairIterator) 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 *ReservationsScopedListPairIterator) Next() (ReservationsScopedListPair, error) {
|
||||
var item ReservationsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ReservationsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ReservationsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/resource_policies_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/resource_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -270,7 +270,9 @@ func NewResourcePoliciesRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultResourcePoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -343,6 +345,9 @@ func (c *resourcePoliciesRESTClient) AggregatedList(ctx context.Context, req *co
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -974,103 +979,3 @@ func (c *resourcePoliciesRESTClient) TestIamPermissions(ctx context.Context, req
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// ResourcePoliciesScopedListPair is a holder type for string/*computepb.ResourcePoliciesScopedList map entries
|
||||
type ResourcePoliciesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.ResourcePoliciesScopedList
|
||||
}
|
||||
|
||||
// ResourcePoliciesScopedListPairIterator manages a stream of ResourcePoliciesScopedListPair.
|
||||
type ResourcePoliciesScopedListPairIterator struct {
|
||||
items []ResourcePoliciesScopedListPair
|
||||
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 []ResourcePoliciesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ResourcePoliciesScopedListPairIterator) 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 *ResourcePoliciesScopedListPairIterator) Next() (ResourcePoliciesScopedListPair, error) {
|
||||
var item ResourcePoliciesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ResourcePoliciesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ResourcePoliciesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// ResourcePolicyIterator manages a stream of *computepb.ResourcePolicy.
|
||||
type ResourcePolicyIterator struct {
|
||||
items []*computepb.ResourcePolicy
|
||||
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 []*computepb.ResourcePolicy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ResourcePolicyIterator) 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 *ResourcePolicyIterator) Next() (*computepb.ResourcePolicy, error) {
|
||||
var item *computepb.ResourcePolicy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ResourcePolicyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ResourcePolicyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
235
vendor/cloud.google.com/go/compute/apiv1/routers_client.go
generated
vendored
235
vendor/cloud.google.com/go/compute/apiv1/routers_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -46,6 +46,7 @@ type RoutersCallOptions struct {
|
|||
AggregatedList []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
GetNatIpInfo []gax.CallOption
|
||||
GetNatMappingInfo []gax.CallOption
|
||||
GetRouterStatus []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
|
|
@ -84,6 +85,18 @@ func defaultRoutersRESTCallOptions() *RoutersCallOptions {
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
GetNatIpInfo: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnHTTPCodes(gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.30,
|
||||
},
|
||||
http.StatusGatewayTimeout,
|
||||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
GetNatMappingInfo: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
|
|
@ -143,6 +156,7 @@ type internalRoutersClient interface {
|
|||
AggregatedList(context.Context, *computepb.AggregatedListRoutersRequest, ...gax.CallOption) *RoutersScopedListPairIterator
|
||||
Delete(context.Context, *computepb.DeleteRouterRequest, ...gax.CallOption) (*Operation, error)
|
||||
Get(context.Context, *computepb.GetRouterRequest, ...gax.CallOption) (*computepb.Router, error)
|
||||
GetNatIpInfo(context.Context, *computepb.GetNatIpInfoRouterRequest, ...gax.CallOption) (*computepb.NatIpInfoResponse, error)
|
||||
GetNatMappingInfo(context.Context, *computepb.GetNatMappingInfoRoutersRequest, ...gax.CallOption) *VmEndpointNatMappingsIterator
|
||||
GetRouterStatus(context.Context, *computepb.GetRouterStatusRouterRequest, ...gax.CallOption) (*computepb.RouterStatusResponse, error)
|
||||
Insert(context.Context, *computepb.InsertRouterRequest, ...gax.CallOption) (*Operation, error)
|
||||
|
|
@ -202,6 +216,11 @@ func (c *RoutersClient) Get(ctx context.Context, req *computepb.GetRouterRequest
|
|||
return c.internalClient.Get(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// GetNatIpInfo retrieves runtime NAT IP information.
|
||||
func (c *RoutersClient) GetNatIpInfo(ctx context.Context, req *computepb.GetNatIpInfoRouterRequest, opts ...gax.CallOption) (*computepb.NatIpInfoResponse, error) {
|
||||
return c.internalClient.GetNatIpInfo(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// GetNatMappingInfo retrieves runtime Nat mapping information of VM endpoints.
|
||||
func (c *RoutersClient) GetNatMappingInfo(ctx context.Context, req *computepb.GetNatMappingInfoRoutersRequest, opts ...gax.CallOption) *VmEndpointNatMappingsIterator {
|
||||
return c.internalClient.GetNatMappingInfo(ctx, req, opts...)
|
||||
|
|
@ -289,7 +308,9 @@ func NewRoutersRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ro
|
|||
func defaultRoutersRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -362,6 +383,9 @@ func (c *routersRESTClient) AggregatedList(ctx context.Context, req *computepb.A
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -554,6 +578,68 @@ func (c *routersRESTClient) Get(ctx context.Context, req *computepb.GetRouterReq
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
// GetNatIpInfo retrieves runtime NAT IP information.
|
||||
func (c *routersRESTClient) GetNatIpInfo(ctx context.Context, req *computepb.GetNatIpInfoRouterRequest, opts ...gax.CallOption) (*computepb.NatIpInfoResponse, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/routers/%v/getNatIpInfo", req.GetProject(), req.GetRegion(), req.GetRouter())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.NatName != nil {
|
||||
params.Add("natName", fmt.Sprintf("%v", req.GetNatName()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "router", url.QueryEscape(req.GetRouter()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).GetNatIpInfo[0:len((*c.CallOptions).GetNatIpInfo):len((*c.CallOptions).GetNatIpInfo)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.NatIpInfoResponse{}
|
||||
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
|
||||
}
|
||||
|
||||
// GetNatMappingInfo retrieves runtime Nat mapping information of VM endpoints.
|
||||
func (c *routersRESTClient) GetNatMappingInfo(ctx context.Context, req *computepb.GetNatMappingInfoRoutersRequest, opts ...gax.CallOption) *VmEndpointNatMappingsIterator {
|
||||
it := &VmEndpointNatMappingsIterator{}
|
||||
|
|
@ -1098,150 +1184,3 @@ func (c *routersRESTClient) Update(ctx context.Context, req *computepb.UpdateRou
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// RouterIterator manages a stream of *computepb.Router.
|
||||
type RouterIterator struct {
|
||||
items []*computepb.Router
|
||||
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 []*computepb.Router, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *RouterIterator) 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 *RouterIterator) Next() (*computepb.Router, error) {
|
||||
var item *computepb.Router
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *RouterIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *RouterIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// RoutersScopedListPair is a holder type for string/*computepb.RoutersScopedList map entries
|
||||
type RoutersScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.RoutersScopedList
|
||||
}
|
||||
|
||||
// RoutersScopedListPairIterator manages a stream of RoutersScopedListPair.
|
||||
type RoutersScopedListPairIterator struct {
|
||||
items []RoutersScopedListPair
|
||||
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 []RoutersScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *RoutersScopedListPairIterator) 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 *RoutersScopedListPairIterator) Next() (RoutersScopedListPair, error) {
|
||||
var item RoutersScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *RoutersScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *RoutersScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// VmEndpointNatMappingsIterator manages a stream of *computepb.VmEndpointNatMappings.
|
||||
type VmEndpointNatMappingsIterator struct {
|
||||
items []*computepb.VmEndpointNatMappings
|
||||
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 []*computepb.VmEndpointNatMappings, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *VmEndpointNatMappingsIterator) 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 *VmEndpointNatMappingsIterator) Next() (*computepb.VmEndpointNatMappings, error) {
|
||||
var item *computepb.VmEndpointNatMappings
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *VmEndpointNatMappingsIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *VmEndpointNatMappingsIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/routes_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/routes_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -201,7 +201,9 @@ func NewRoutesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Rou
|
|||
func defaultRoutesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -530,50 +532,3 @@ func (c *routesRESTClient) List(ctx context.Context, req *computepb.ListRoutesRe
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// RouteIterator manages a stream of *computepb.Route.
|
||||
type RouteIterator struct {
|
||||
items []*computepb.Route
|
||||
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 []*computepb.Route, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *RouteIterator) 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 *RouteIterator) Next() (*computepb.Route, error) {
|
||||
var item *computepb.Route
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *RouteIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *RouteIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
66
vendor/cloud.google.com/go/compute/apiv1/security_policies_client.go
generated
vendored
66
vendor/cloud.google.com/go/compute/apiv1/security_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -309,7 +309,9 @@ func NewSecurityPoliciesRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultSecurityPoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -458,6 +460,9 @@ func (c *securityPoliciesRESTClient) AggregatedList(ctx context.Context, req *co
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -980,6 +985,9 @@ func (c *securityPoliciesRESTClient) Patch(ctx context.Context, req *computepb.P
|
|||
if req != nil && req.RequestId != nil {
|
||||
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
|
||||
}
|
||||
if req != nil && req.UpdateMask != nil {
|
||||
params.Add("updateMask", fmt.Sprintf("%v", req.GetUpdateMask()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1056,6 +1064,9 @@ func (c *securityPoliciesRESTClient) PatchRule(ctx context.Context, req *compute
|
|||
if req != nil && req.Priority != nil {
|
||||
params.Add("priority", fmt.Sprintf("%v", req.GetPriority()))
|
||||
}
|
||||
if req != nil && req.UpdateMask != nil {
|
||||
params.Add("updateMask", fmt.Sprintf("%v", req.GetUpdateMask()))
|
||||
}
|
||||
if req != nil && req.ValidateOnly != nil {
|
||||
params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly()))
|
||||
}
|
||||
|
|
@ -1253,56 +1264,3 @@ func (c *securityPoliciesRESTClient) SetLabels(ctx context.Context, req *compute
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// SecurityPoliciesScopedListPair is a holder type for string/*computepb.SecurityPoliciesScopedList map entries
|
||||
type SecurityPoliciesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.SecurityPoliciesScopedList
|
||||
}
|
||||
|
||||
// SecurityPoliciesScopedListPairIterator manages a stream of SecurityPoliciesScopedListPair.
|
||||
type SecurityPoliciesScopedListPairIterator struct {
|
||||
items []SecurityPoliciesScopedListPair
|
||||
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 []SecurityPoliciesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SecurityPoliciesScopedListPairIterator) 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 *SecurityPoliciesScopedListPairIterator) Next() (SecurityPoliciesScopedListPair, error) {
|
||||
var item SecurityPoliciesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SecurityPoliciesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SecurityPoliciesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/service_attachments_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/service_attachments_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -270,7 +270,9 @@ func NewServiceAttachmentsRESTClient(ctx context.Context, opts ...option.ClientO
|
|||
func defaultServiceAttachmentsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -343,6 +345,9 @@ func (c *serviceAttachmentsRESTClient) AggregatedList(ctx context.Context, req *
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -971,103 +976,3 @@ func (c *serviceAttachmentsRESTClient) TestIamPermissions(ctx context.Context, r
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// ServiceAttachmentIterator manages a stream of *computepb.ServiceAttachment.
|
||||
type ServiceAttachmentIterator struct {
|
||||
items []*computepb.ServiceAttachment
|
||||
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 []*computepb.ServiceAttachment, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ServiceAttachmentIterator) 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 *ServiceAttachmentIterator) Next() (*computepb.ServiceAttachment, error) {
|
||||
var item *computepb.ServiceAttachment
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ServiceAttachmentIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ServiceAttachmentIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// ServiceAttachmentsScopedListPair is a holder type for string/*computepb.ServiceAttachmentsScopedList map entries
|
||||
type ServiceAttachmentsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.ServiceAttachmentsScopedList
|
||||
}
|
||||
|
||||
// ServiceAttachmentsScopedListPairIterator manages a stream of ServiceAttachmentsScopedListPair.
|
||||
type ServiceAttachmentsScopedListPairIterator struct {
|
||||
items []ServiceAttachmentsScopedListPair
|
||||
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 []ServiceAttachmentsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ServiceAttachmentsScopedListPairIterator) 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 *ServiceAttachmentsScopedListPairIterator) Next() (ServiceAttachmentsScopedListPair, error) {
|
||||
var item ServiceAttachmentsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ServiceAttachmentsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ServiceAttachmentsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
339
vendor/cloud.google.com/go/compute/apiv1/snapshot_settings_client.go
generated
vendored
Normal file
339
vendor/cloud.google.com/go/compute/apiv1/snapshot_settings_client.go
generated
vendored
Normal file
|
|
@ -0,0 +1,339 @@
|
|||
// 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 compute
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
computepb "cloud.google.com/go/compute/apiv1/computepb"
|
||||
gax "github.com/googleapis/gax-go/v2"
|
||||
"google.golang.org/api/googleapi"
|
||||
"google.golang.org/api/option"
|
||||
"google.golang.org/api/option/internaloption"
|
||||
httptransport "google.golang.org/api/transport/http"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
)
|
||||
|
||||
var newSnapshotSettingsClientHook clientHook
|
||||
|
||||
// SnapshotSettingsCallOptions contains the retry settings for each method of SnapshotSettingsClient.
|
||||
type SnapshotSettingsCallOptions struct {
|
||||
Get []gax.CallOption
|
||||
Patch []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultSnapshotSettingsRESTCallOptions() *SnapshotSettingsCallOptions {
|
||||
return &SnapshotSettingsCallOptions{
|
||||
Get: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
gax.WithRetry(func() gax.Retryer {
|
||||
return gax.OnHTTPCodes(gax.Backoff{
|
||||
Initial: 100 * time.Millisecond,
|
||||
Max: 60000 * time.Millisecond,
|
||||
Multiplier: 1.30,
|
||||
},
|
||||
http.StatusGatewayTimeout,
|
||||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
Patch: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// internalSnapshotSettingsClient is an interface that defines the methods available from Google Compute Engine API.
|
||||
type internalSnapshotSettingsClient interface {
|
||||
Close() error
|
||||
setGoogleClientInfo(...string)
|
||||
Connection() *grpc.ClientConn
|
||||
Get(context.Context, *computepb.GetSnapshotSettingRequest, ...gax.CallOption) (*computepb.SnapshotSettings, error)
|
||||
Patch(context.Context, *computepb.PatchSnapshotSettingRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
// SnapshotSettingsClient is a client for interacting with Google Compute Engine API.
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
//
|
||||
// The SnapshotSettings API.
|
||||
type SnapshotSettingsClient struct {
|
||||
// The internal transport-dependent client.
|
||||
internalClient internalSnapshotSettingsClient
|
||||
|
||||
// The call options for this service.
|
||||
CallOptions *SnapshotSettingsCallOptions
|
||||
}
|
||||
|
||||
// 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 *SnapshotSettingsClient) 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 *SnapshotSettingsClient) 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 *SnapshotSettingsClient) Connection() *grpc.ClientConn {
|
||||
return c.internalClient.Connection()
|
||||
}
|
||||
|
||||
// Get get snapshot settings.
|
||||
func (c *SnapshotSettingsClient) Get(ctx context.Context, req *computepb.GetSnapshotSettingRequest, opts ...gax.CallOption) (*computepb.SnapshotSettings, error) {
|
||||
return c.internalClient.Get(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Patch patch snapshot settings.
|
||||
func (c *SnapshotSettingsClient) Patch(ctx context.Context, req *computepb.PatchSnapshotSettingRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.Patch(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
type snapshotSettingsRESTClient struct {
|
||||
// The http endpoint to connect to.
|
||||
endpoint string
|
||||
|
||||
// The http client.
|
||||
httpClient *http.Client
|
||||
|
||||
// operationClient is used to call the operation-specific management service.
|
||||
operationClient *GlobalOperationsClient
|
||||
|
||||
// The x-goog-* headers to be sent with each request.
|
||||
xGoogHeaders []string
|
||||
|
||||
// Points back to the CallOptions field of the containing SnapshotSettingsClient
|
||||
CallOptions **SnapshotSettingsCallOptions
|
||||
}
|
||||
|
||||
// NewSnapshotSettingsRESTClient creates a new snapshot settings service rest client.
|
||||
//
|
||||
// The SnapshotSettings API.
|
||||
func NewSnapshotSettingsRESTClient(ctx context.Context, opts ...option.ClientOption) (*SnapshotSettingsClient, error) {
|
||||
clientOpts := append(defaultSnapshotSettingsRESTClientOptions(), opts...)
|
||||
httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
callOpts := defaultSnapshotSettingsRESTCallOptions()
|
||||
c := &snapshotSettingsRESTClient{
|
||||
endpoint: endpoint,
|
||||
httpClient: httpClient,
|
||||
CallOptions: &callOpts,
|
||||
}
|
||||
c.setGoogleClientInfo()
|
||||
|
||||
o := []option.ClientOption{
|
||||
option.WithHTTPClient(httpClient),
|
||||
option.WithEndpoint(endpoint),
|
||||
}
|
||||
opC, err := NewGlobalOperationsRESTClient(ctx, o...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.operationClient = opC
|
||||
|
||||
return &SnapshotSettingsClient{internalClient: c, CallOptions: callOpts}, nil
|
||||
}
|
||||
|
||||
func defaultSnapshotSettingsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.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 *snapshotSettingsRESTClient) 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 *snapshotSettingsRESTClient) Close() error {
|
||||
// Replace httpClient with nil to force cleanup.
|
||||
c.httpClient = nil
|
||||
if err := c.operationClient.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Connection returns a connection to the API service.
|
||||
//
|
||||
// Deprecated: This method always returns nil.
|
||||
func (c *snapshotSettingsRESTClient) Connection() *grpc.ClientConn {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get get snapshot settings.
|
||||
func (c *snapshotSettingsRESTClient) Get(ctx context.Context, req *computepb.GetSnapshotSettingRequest, opts ...gax.CallOption) (*computepb.SnapshotSettings, error) {
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/snapshotSettings", req.GetProject())
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "project", url.QueryEscape(req.GetProject()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).Get[0:len((*c.CallOptions).Get):len((*c.CallOptions).Get)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.SnapshotSettings{}
|
||||
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
|
||||
}
|
||||
|
||||
// Patch patch snapshot settings.
|
||||
func (c *snapshotSettingsRESTClient) Patch(ctx context.Context, req *computepb.PatchSnapshotSettingRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetSnapshotSettingsResource()
|
||||
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("/compute/v1/projects/%v/global/snapshotSettings", req.GetProject())
|
||||
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
|
||||
}
|
||||
if req != nil && req.UpdateMask != nil {
|
||||
params.Add("updateMask", fmt.Sprintf("%v", req.GetUpdateMask()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "project", url.QueryEscape(req.GetProject()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).Patch[0:len((*c.CallOptions).Patch):len((*c.CallOptions).Patch)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
|
||||
if settings.Path != "" {
|
||||
baseUrl.Path = settings.Path
|
||||
}
|
||||
httpReq, err := http.NewRequest("PATCH", 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
|
||||
}
|
||||
op := &Operation{
|
||||
&globalOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
51
vendor/cloud.google.com/go/compute/apiv1/snapshots_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/snapshots_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -250,7 +250,9 @@ func NewSnapshotsRESTClient(ctx context.Context, opts ...option.ClientOption) (*
|
|||
func defaultSnapshotsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -834,50 +836,3 @@ func (c *snapshotsRESTClient) TestIamPermissions(ctx context.Context, req *compu
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// SnapshotIterator manages a stream of *computepb.Snapshot.
|
||||
type SnapshotIterator struct {
|
||||
items []*computepb.Snapshot
|
||||
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 []*computepb.Snapshot, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SnapshotIterator) 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 *SnapshotIterator) Next() (*computepb.Snapshot, error) {
|
||||
var item *computepb.Snapshot
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SnapshotIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SnapshotIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/ssl_certificates_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/ssl_certificates_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -221,7 +221,9 @@ func NewSslCertificatesRESTClient(ctx context.Context, opts ...option.ClientOpti
|
|||
func defaultSslCertificatesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -294,6 +296,9 @@ func (c *sslCertificatesRESTClient) AggregatedList(ctx context.Context, req *com
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -657,56 +662,3 @@ func (c *sslCertificatesRESTClient) List(ctx context.Context, req *computepb.Lis
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// SslCertificatesScopedListPair is a holder type for string/*computepb.SslCertificatesScopedList map entries
|
||||
type SslCertificatesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.SslCertificatesScopedList
|
||||
}
|
||||
|
||||
// SslCertificatesScopedListPairIterator manages a stream of SslCertificatesScopedListPair.
|
||||
type SslCertificatesScopedListPairIterator struct {
|
||||
items []SslCertificatesScopedListPair
|
||||
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 []SslCertificatesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SslCertificatesScopedListPairIterator) 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 *SslCertificatesScopedListPairIterator) Next() (SslCertificatesScopedListPair, error) {
|
||||
var item SslCertificatesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SslCertificatesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SslCertificatesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/ssl_policies_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/ssl_policies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -250,7 +250,9 @@ func NewSslPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultSslPoliciesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -323,6 +325,9 @@ func (c *sslPoliciesRESTClient) AggregatedList(ctx context.Context, req *compute
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -836,56 +841,3 @@ func (c *sslPoliciesRESTClient) Patch(ctx context.Context, req *computepb.PatchS
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// SslPoliciesScopedListPair is a holder type for string/*computepb.SslPoliciesScopedList map entries
|
||||
type SslPoliciesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.SslPoliciesScopedList
|
||||
}
|
||||
|
||||
// SslPoliciesScopedListPairIterator manages a stream of SslPoliciesScopedListPair.
|
||||
type SslPoliciesScopedListPairIterator struct {
|
||||
items []SslPoliciesScopedListPair
|
||||
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 []SslPoliciesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SslPoliciesScopedListPairIterator) 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 *SslPoliciesScopedListPairIterator) Next() (SslPoliciesScopedListPair, error) {
|
||||
var item SslPoliciesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SslPoliciesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SslPoliciesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
154
vendor/cloud.google.com/go/compute/apiv1/subnetworks_client.go
generated
vendored
154
vendor/cloud.google.com/go/compute/apiv1/subnetworks_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -309,7 +309,9 @@ func NewSubnetworksRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultSubnetworksRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -382,6 +384,9 @@ func (c *subnetworksRESTClient) AggregatedList(ctx context.Context, req *compute
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1264,150 +1269,3 @@ func (c *subnetworksRESTClient) TestIamPermissions(ctx context.Context, req *com
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// SubnetworkIterator manages a stream of *computepb.Subnetwork.
|
||||
type SubnetworkIterator struct {
|
||||
items []*computepb.Subnetwork
|
||||
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 []*computepb.Subnetwork, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SubnetworkIterator) 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 *SubnetworkIterator) Next() (*computepb.Subnetwork, error) {
|
||||
var item *computepb.Subnetwork
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SubnetworkIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SubnetworkIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// SubnetworksScopedListPair is a holder type for string/*computepb.SubnetworksScopedList map entries
|
||||
type SubnetworksScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.SubnetworksScopedList
|
||||
}
|
||||
|
||||
// SubnetworksScopedListPairIterator manages a stream of SubnetworksScopedListPair.
|
||||
type SubnetworksScopedListPairIterator struct {
|
||||
items []SubnetworksScopedListPair
|
||||
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 []SubnetworksScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *SubnetworksScopedListPairIterator) 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 *SubnetworksScopedListPairIterator) Next() (SubnetworksScopedListPair, error) {
|
||||
var item SubnetworksScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *SubnetworksScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *SubnetworksScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// UsableSubnetworkIterator manages a stream of *computepb.UsableSubnetwork.
|
||||
type UsableSubnetworkIterator struct {
|
||||
items []*computepb.UsableSubnetwork
|
||||
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 []*computepb.UsableSubnetwork, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *UsableSubnetworkIterator) 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 *UsableSubnetworkIterator) Next() (*computepb.UsableSubnetwork, error) {
|
||||
var item *computepb.UsableSubnetwork
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *UsableSubnetworkIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *UsableSubnetworkIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/target_grpc_proxies_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/target_grpc_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -211,7 +211,9 @@ func NewTargetGrpcProxiesRESTClient(ctx context.Context, opts ...option.ClientOp
|
|||
func defaultTargetGrpcProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -616,50 +618,3 @@ func (c *targetGrpcProxiesRESTClient) Patch(ctx context.Context, req *computepb.
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetGrpcProxyIterator manages a stream of *computepb.TargetGrpcProxy.
|
||||
type TargetGrpcProxyIterator struct {
|
||||
items []*computepb.TargetGrpcProxy
|
||||
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 []*computepb.TargetGrpcProxy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetGrpcProxyIterator) 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 *TargetGrpcProxyIterator) Next() (*computepb.TargetGrpcProxy, error) {
|
||||
var item *computepb.TargetGrpcProxy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetGrpcProxyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetGrpcProxyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/target_http_proxies_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/target_http_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -241,7 +241,9 @@ func NewTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.ClientOp
|
|||
func defaultTargetHttpProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -314,6 +316,9 @@ func (c *targetHttpProxiesRESTClient) AggregatedList(ctx context.Context, req *c
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -829,56 +834,3 @@ func (c *targetHttpProxiesRESTClient) SetUrlMap(ctx context.Context, req *comput
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetHttpProxiesScopedListPair is a holder type for string/*computepb.TargetHttpProxiesScopedList map entries
|
||||
type TargetHttpProxiesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.TargetHttpProxiesScopedList
|
||||
}
|
||||
|
||||
// TargetHttpProxiesScopedListPairIterator manages a stream of TargetHttpProxiesScopedListPair.
|
||||
type TargetHttpProxiesScopedListPairIterator struct {
|
||||
items []TargetHttpProxiesScopedListPair
|
||||
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 []TargetHttpProxiesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetHttpProxiesScopedListPairIterator) 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 *TargetHttpProxiesScopedListPairIterator) Next() (TargetHttpProxiesScopedListPair, error) {
|
||||
var item TargetHttpProxiesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetHttpProxiesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetHttpProxiesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/target_https_proxies_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/target_https_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -281,7 +281,9 @@ func NewTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.ClientO
|
|||
func defaultTargetHttpsProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -354,6 +356,9 @@ func (c *targetHttpsProxiesRESTClient) AggregatedList(ctx context.Context, req *
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1173,56 +1178,3 @@ func (c *targetHttpsProxiesRESTClient) SetUrlMap(ctx context.Context, req *compu
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetHttpsProxiesScopedListPair is a holder type for string/*computepb.TargetHttpsProxiesScopedList map entries
|
||||
type TargetHttpsProxiesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.TargetHttpsProxiesScopedList
|
||||
}
|
||||
|
||||
// TargetHttpsProxiesScopedListPairIterator manages a stream of TargetHttpsProxiesScopedListPair.
|
||||
type TargetHttpsProxiesScopedListPairIterator struct {
|
||||
items []TargetHttpsProxiesScopedListPair
|
||||
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 []TargetHttpsProxiesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetHttpsProxiesScopedListPairIterator) 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 *TargetHttpsProxiesScopedListPairIterator) Next() (TargetHttpsProxiesScopedListPair, error) {
|
||||
var item TargetHttpsProxiesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetHttpsProxiesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetHttpsProxiesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
190
vendor/cloud.google.com/go/compute/apiv1/target_instances_client.go
generated
vendored
190
vendor/cloud.google.com/go/compute/apiv1/target_instances_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -43,11 +43,12 @@ var newTargetInstancesClientHook clientHook
|
|||
|
||||
// TargetInstancesCallOptions contains the retry settings for each method of TargetInstancesClient.
|
||||
type TargetInstancesCallOptions struct {
|
||||
AggregatedList []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
AggregatedList []gax.CallOption
|
||||
Delete []gax.CallOption
|
||||
Get []gax.CallOption
|
||||
Insert []gax.CallOption
|
||||
List []gax.CallOption
|
||||
SetSecurityPolicy []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultTargetInstancesRESTCallOptions() *TargetInstancesCallOptions {
|
||||
|
|
@ -94,6 +95,9 @@ func defaultTargetInstancesRESTCallOptions() *TargetInstancesCallOptions {
|
|||
http.StatusServiceUnavailable)
|
||||
}),
|
||||
},
|
||||
SetSecurityPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -107,6 +111,7 @@ type internalTargetInstancesClient interface {
|
|||
Get(context.Context, *computepb.GetTargetInstanceRequest, ...gax.CallOption) (*computepb.TargetInstance, error)
|
||||
Insert(context.Context, *computepb.InsertTargetInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
List(context.Context, *computepb.ListTargetInstancesRequest, ...gax.CallOption) *TargetInstanceIterator
|
||||
SetSecurityPolicy(context.Context, *computepb.SetSecurityPolicyTargetInstanceRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
// TargetInstancesClient is a client for interacting with Google Compute Engine API.
|
||||
|
|
@ -169,6 +174,11 @@ func (c *TargetInstancesClient) List(ctx context.Context, req *computepb.ListTar
|
|||
return c.internalClient.List(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview
|
||||
func (c *TargetInstancesClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyTargetInstanceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.SetSecurityPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
type targetInstancesRESTClient struct {
|
||||
// The http endpoint to connect to.
|
||||
|
|
@ -221,7 +231,9 @@ func NewTargetInstancesRESTClient(ctx context.Context, opts ...option.ClientOpti
|
|||
func defaultTargetInstancesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -294,6 +306,9 @@ func (c *targetInstancesRESTClient) AggregatedList(ctx context.Context, req *com
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -660,102 +675,79 @@ func (c *targetInstancesRESTClient) List(ctx context.Context, req *computepb.Lis
|
|||
return it
|
||||
}
|
||||
|
||||
// TargetInstanceIterator manages a stream of *computepb.TargetInstance.
|
||||
type TargetInstanceIterator struct {
|
||||
items []*computepb.TargetInstance
|
||||
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 []*computepb.TargetInstance, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetInstanceIterator) 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 *TargetInstanceIterator) Next() (*computepb.TargetInstance, error) {
|
||||
var item *computepb.TargetInstance
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview
|
||||
func (c *targetInstancesRESTClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyTargetInstanceRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetSecurityPolicyReferenceResource()
|
||||
jsonReq, err := m.Marshal(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetInstanceIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetInstanceIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// TargetInstancesScopedListPair is a holder type for string/*computepb.TargetInstancesScopedList map entries
|
||||
type TargetInstancesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.TargetInstancesScopedList
|
||||
}
|
||||
|
||||
// TargetInstancesScopedListPairIterator manages a stream of TargetInstancesScopedListPair.
|
||||
type TargetInstancesScopedListPairIterator struct {
|
||||
items []TargetInstancesScopedListPair
|
||||
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 []TargetInstancesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetInstancesScopedListPairIterator) 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 *TargetInstancesScopedListPairIterator) Next() (TargetInstancesScopedListPair, error) {
|
||||
var item TargetInstancesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/targetInstances/%v/setSecurityPolicy", req.GetProject(), req.GetZone(), req.GetTargetInstance())
|
||||
|
||||
func (it *TargetInstancesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
|
||||
}
|
||||
|
||||
func (it *TargetInstancesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "target_instance", url.QueryEscape(req.GetTargetInstance()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).SetSecurityPolicy[0:len((*c.CallOptions).SetSecurityPolicy):len((*c.CallOptions).SetSecurityPolicy)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
&zoneOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
zone: req.GetZone(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
|
|
|||
180
vendor/cloud.google.com/go/compute/apiv1/target_pools_client.go
generated
vendored
180
vendor/cloud.google.com/go/compute/apiv1/target_pools_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -54,6 +54,7 @@ type TargetPoolsCallOptions struct {
|
|||
RemoveHealthCheck []gax.CallOption
|
||||
RemoveInstance []gax.CallOption
|
||||
SetBackup []gax.CallOption
|
||||
SetSecurityPolicy []gax.CallOption
|
||||
}
|
||||
|
||||
func defaultTargetPoolsRESTCallOptions() *TargetPoolsCallOptions {
|
||||
|
|
@ -118,6 +119,9 @@ func defaultTargetPoolsRESTCallOptions() *TargetPoolsCallOptions {
|
|||
SetBackup: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
SetSecurityPolicy: []gax.CallOption{
|
||||
gax.WithTimeout(600000 * time.Millisecond),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -137,6 +141,7 @@ type internalTargetPoolsClient interface {
|
|||
RemoveHealthCheck(context.Context, *computepb.RemoveHealthCheckTargetPoolRequest, ...gax.CallOption) (*Operation, error)
|
||||
RemoveInstance(context.Context, *computepb.RemoveInstanceTargetPoolRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetBackup(context.Context, *computepb.SetBackupTargetPoolRequest, ...gax.CallOption) (*Operation, error)
|
||||
SetSecurityPolicy(context.Context, *computepb.SetSecurityPolicyTargetPoolRequest, ...gax.CallOption) (*Operation, error)
|
||||
}
|
||||
|
||||
// TargetPoolsClient is a client for interacting with Google Compute Engine API.
|
||||
|
|
@ -229,6 +234,11 @@ func (c *TargetPoolsClient) SetBackup(ctx context.Context, req *computepb.SetBac
|
|||
return c.internalClient.SetBackup(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview
|
||||
func (c *TargetPoolsClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyTargetPoolRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
return c.internalClient.SetSecurityPolicy(ctx, req, opts...)
|
||||
}
|
||||
|
||||
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
|
||||
type targetPoolsRESTClient struct {
|
||||
// The http endpoint to connect to.
|
||||
|
|
@ -281,7 +291,9 @@ func NewTargetPoolsRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultTargetPoolsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -508,6 +520,9 @@ func (c *targetPoolsRESTClient) AggregatedList(ctx context.Context, req *compute
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -1170,102 +1185,79 @@ func (c *targetPoolsRESTClient) SetBackup(ctx context.Context, req *computepb.Se
|
|||
return op, nil
|
||||
}
|
||||
|
||||
// TargetPoolIterator manages a stream of *computepb.TargetPool.
|
||||
type TargetPoolIterator struct {
|
||||
items []*computepb.TargetPool
|
||||
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 []*computepb.TargetPool, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetPoolIterator) 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 *TargetPoolIterator) Next() (*computepb.TargetPool, error) {
|
||||
var item *computepb.TargetPool
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
// SetSecurityPolicy sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview
|
||||
func (c *targetPoolsRESTClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyTargetPoolRequest, opts ...gax.CallOption) (*Operation, error) {
|
||||
m := protojson.MarshalOptions{AllowPartial: true}
|
||||
body := req.GetSecurityPolicyReferenceResource()
|
||||
jsonReq, err := m.Marshal(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetPoolIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetPoolIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// TargetPoolsScopedListPair is a holder type for string/*computepb.TargetPoolsScopedList map entries
|
||||
type TargetPoolsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.TargetPoolsScopedList
|
||||
}
|
||||
|
||||
// TargetPoolsScopedListPairIterator manages a stream of TargetPoolsScopedListPair.
|
||||
type TargetPoolsScopedListPairIterator struct {
|
||||
items []TargetPoolsScopedListPair
|
||||
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 []TargetPoolsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetPoolsScopedListPairIterator) 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 *TargetPoolsScopedListPairIterator) Next() (TargetPoolsScopedListPair, error) {
|
||||
var item TargetPoolsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
baseUrl, err := url.Parse(c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/targetPools/%v/setSecurityPolicy", req.GetProject(), req.GetRegion(), req.GetTargetPool())
|
||||
|
||||
func (it *TargetPoolsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
params := url.Values{}
|
||||
if req != nil && req.RequestId != nil {
|
||||
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
|
||||
}
|
||||
|
||||
func (it *TargetPoolsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
// Build HTTP headers from client and context metadata.
|
||||
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "target_pool", url.QueryEscape(req.GetTargetPool()))}
|
||||
|
||||
hds = append(c.xGoogHeaders, hds...)
|
||||
hds = append(hds, "Content-Type", "application/json")
|
||||
headers := gax.BuildHeaders(ctx, hds...)
|
||||
opts = append((*c.CallOptions).SetSecurityPolicy[0:len((*c.CallOptions).SetSecurityPolicy):len((*c.CallOptions).SetSecurityPolicy)], opts...)
|
||||
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
|
||||
resp := &computepb.Operation{}
|
||||
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
|
||||
}
|
||||
op := &Operation{
|
||||
®ionOperationsHandle{
|
||||
c: c.operationClient,
|
||||
proto: resp,
|
||||
project: req.GetProject(),
|
||||
region: req.GetRegion(),
|
||||
},
|
||||
}
|
||||
return op, nil
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/target_ssl_proxies_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/target_ssl_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -251,7 +251,9 @@ func NewTargetSslProxiesRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultTargetSslProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -960,50 +962,3 @@ func (c *targetSslProxiesRESTClient) SetSslPolicy(ctx context.Context, req *comp
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetSslProxyIterator manages a stream of *computepb.TargetSslProxy.
|
||||
type TargetSslProxyIterator struct {
|
||||
items []*computepb.TargetSslProxy
|
||||
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 []*computepb.TargetSslProxy, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetSslProxyIterator) 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 *TargetSslProxyIterator) Next() (*computepb.TargetSslProxy, error) {
|
||||
var item *computepb.TargetSslProxy
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetSslProxyIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetSslProxyIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/target_tcp_proxies_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/target_tcp_proxies_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -241,7 +241,9 @@ func NewTargetTcpProxiesRESTClient(ctx context.Context, opts ...option.ClientOpt
|
|||
func defaultTargetTcpProxiesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -314,6 +316,9 @@ func (c *targetTcpProxiesRESTClient) AggregatedList(ctx context.Context, req *co
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -829,56 +834,3 @@ func (c *targetTcpProxiesRESTClient) SetProxyHeader(ctx context.Context, req *co
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetTcpProxiesScopedListPair is a holder type for string/*computepb.TargetTcpProxiesScopedList map entries
|
||||
type TargetTcpProxiesScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.TargetTcpProxiesScopedList
|
||||
}
|
||||
|
||||
// TargetTcpProxiesScopedListPairIterator manages a stream of TargetTcpProxiesScopedListPair.
|
||||
type TargetTcpProxiesScopedListPairIterator struct {
|
||||
items []TargetTcpProxiesScopedListPair
|
||||
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 []TargetTcpProxiesScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetTcpProxiesScopedListPairIterator) 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 *TargetTcpProxiesScopedListPairIterator) Next() (TargetTcpProxiesScopedListPair, error) {
|
||||
var item TargetTcpProxiesScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetTcpProxiesScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetTcpProxiesScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/target_vpn_gateways_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/target_vpn_gateways_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -231,7 +231,9 @@ func NewTargetVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOp
|
|||
func defaultTargetVpnGatewaysRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -304,6 +306,9 @@ func (c *targetVpnGatewaysRESTClient) AggregatedList(ctx context.Context, req *c
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -746,103 +751,3 @@ func (c *targetVpnGatewaysRESTClient) SetLabels(ctx context.Context, req *comput
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// TargetVpnGatewayIterator manages a stream of *computepb.TargetVpnGateway.
|
||||
type TargetVpnGatewayIterator struct {
|
||||
items []*computepb.TargetVpnGateway
|
||||
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 []*computepb.TargetVpnGateway, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetVpnGatewayIterator) 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 *TargetVpnGatewayIterator) Next() (*computepb.TargetVpnGateway, error) {
|
||||
var item *computepb.TargetVpnGateway
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetVpnGatewayIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetVpnGatewayIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// TargetVpnGatewaysScopedListPair is a holder type for string/*computepb.TargetVpnGatewaysScopedList map entries
|
||||
type TargetVpnGatewaysScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.TargetVpnGatewaysScopedList
|
||||
}
|
||||
|
||||
// TargetVpnGatewaysScopedListPairIterator manages a stream of TargetVpnGatewaysScopedListPair.
|
||||
type TargetVpnGatewaysScopedListPairIterator struct {
|
||||
items []TargetVpnGatewaysScopedListPair
|
||||
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 []TargetVpnGatewaysScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *TargetVpnGatewaysScopedListPairIterator) 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 *TargetVpnGatewaysScopedListPairIterator) Next() (TargetVpnGatewaysScopedListPair, error) {
|
||||
var item TargetVpnGatewaysScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *TargetVpnGatewaysScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *TargetVpnGatewaysScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
60
vendor/cloud.google.com/go/compute/apiv1/url_maps_client.go
generated
vendored
60
vendor/cloud.google.com/go/compute/apiv1/url_maps_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -261,7 +261,9 @@ func NewUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ur
|
|||
func defaultUrlMapsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -334,6 +336,9 @@ func (c *urlMapsRESTClient) AggregatedList(ctx context.Context, req *computepb.A
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -987,56 +992,3 @@ func (c *urlMapsRESTClient) Validate(ctx context.Context, req *computepb.Validat
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// UrlMapsScopedListPair is a holder type for string/*computepb.UrlMapsScopedList map entries
|
||||
type UrlMapsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.UrlMapsScopedList
|
||||
}
|
||||
|
||||
// UrlMapsScopedListPairIterator manages a stream of UrlMapsScopedListPair.
|
||||
type UrlMapsScopedListPairIterator struct {
|
||||
items []UrlMapsScopedListPair
|
||||
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 []UrlMapsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *UrlMapsScopedListPairIterator) 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 *UrlMapsScopedListPairIterator) Next() (UrlMapsScopedListPair, error) {
|
||||
var item UrlMapsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *UrlMapsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *UrlMapsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/vpn_gateways_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/vpn_gateways_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -260,7 +260,9 @@ func NewVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption)
|
|||
func defaultVpnGatewaysRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -333,6 +335,9 @@ func (c *vpnGatewaysRESTClient) AggregatedList(ctx context.Context, req *compute
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -892,103 +897,3 @@ func (c *vpnGatewaysRESTClient) TestIamPermissions(ctx context.Context, req *com
|
|||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// VpnGatewayIterator manages a stream of *computepb.VpnGateway.
|
||||
type VpnGatewayIterator struct {
|
||||
items []*computepb.VpnGateway
|
||||
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 []*computepb.VpnGateway, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *VpnGatewayIterator) 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 *VpnGatewayIterator) Next() (*computepb.VpnGateway, error) {
|
||||
var item *computepb.VpnGateway
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *VpnGatewayIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *VpnGatewayIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// VpnGatewaysScopedListPair is a holder type for string/*computepb.VpnGatewaysScopedList map entries
|
||||
type VpnGatewaysScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.VpnGatewaysScopedList
|
||||
}
|
||||
|
||||
// VpnGatewaysScopedListPairIterator manages a stream of VpnGatewaysScopedListPair.
|
||||
type VpnGatewaysScopedListPairIterator struct {
|
||||
items []VpnGatewaysScopedListPair
|
||||
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 []VpnGatewaysScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *VpnGatewaysScopedListPairIterator) 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 *VpnGatewaysScopedListPairIterator) Next() (VpnGatewaysScopedListPair, error) {
|
||||
var item VpnGatewaysScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *VpnGatewaysScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *VpnGatewaysScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
107
vendor/cloud.google.com/go/compute/apiv1/vpn_tunnels_client.go
generated
vendored
107
vendor/cloud.google.com/go/compute/apiv1/vpn_tunnels_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -231,7 +231,9 @@ func NewVpnTunnelsRESTClient(ctx context.Context, opts ...option.ClientOption) (
|
|||
func defaultVpnTunnelsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -304,6 +306,9 @@ func (c *vpnTunnelsRESTClient) AggregatedList(ctx context.Context, req *computep
|
|||
if req != nil && req.ReturnPartialSuccess != nil {
|
||||
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
|
||||
}
|
||||
if req != nil && req.ServiceProjectNumber != nil {
|
||||
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
|
||||
}
|
||||
|
||||
baseUrl.RawQuery = params.Encode()
|
||||
|
||||
|
|
@ -746,103 +751,3 @@ func (c *vpnTunnelsRESTClient) SetLabels(ctx context.Context, req *computepb.Set
|
|||
}
|
||||
return op, nil
|
||||
}
|
||||
|
||||
// VpnTunnelIterator manages a stream of *computepb.VpnTunnel.
|
||||
type VpnTunnelIterator struct {
|
||||
items []*computepb.VpnTunnel
|
||||
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 []*computepb.VpnTunnel, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *VpnTunnelIterator) 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 *VpnTunnelIterator) Next() (*computepb.VpnTunnel, error) {
|
||||
var item *computepb.VpnTunnel
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *VpnTunnelIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *VpnTunnelIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
||||
// VpnTunnelsScopedListPair is a holder type for string/*computepb.VpnTunnelsScopedList map entries
|
||||
type VpnTunnelsScopedListPair struct {
|
||||
Key string
|
||||
Value *computepb.VpnTunnelsScopedList
|
||||
}
|
||||
|
||||
// VpnTunnelsScopedListPairIterator manages a stream of VpnTunnelsScopedListPair.
|
||||
type VpnTunnelsScopedListPairIterator struct {
|
||||
items []VpnTunnelsScopedListPair
|
||||
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 []VpnTunnelsScopedListPair, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *VpnTunnelsScopedListPairIterator) 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 *VpnTunnelsScopedListPairIterator) Next() (VpnTunnelsScopedListPair, error) {
|
||||
var item VpnTunnelsScopedListPair
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *VpnTunnelsScopedListPairIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *VpnTunnelsScopedListPairIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/compute/apiv1/zone_operations_client.go
generated
vendored
4
vendor/cloud.google.com/go/compute/apiv1/zone_operations_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -187,7 +187,9 @@ func NewZoneOperationsRESTClient(ctx context.Context, opts ...option.ClientOptio
|
|||
func defaultZoneOperationsRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
|
|||
51
vendor/cloud.google.com/go/compute/apiv1/zones_client.go
generated
vendored
51
vendor/cloud.google.com/go/compute/apiv1/zones_client.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2023 Google LLC
|
||||
// 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.
|
||||
|
|
@ -167,7 +167,9 @@ func NewZonesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Zone
|
|||
func defaultZonesRESTClientOptions() []option.ClientOption {
|
||||
return []option.ClientOption{
|
||||
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
|
||||
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
|
||||
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
|
||||
internaloption.WithDefaultUniverseDomain("googleapis.com"),
|
||||
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
|
||||
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
|
||||
}
|
||||
|
|
@ -348,50 +350,3 @@ func (c *zonesRESTClient) List(ctx context.Context, req *computepb.ListZonesRequ
|
|||
|
||||
return it
|
||||
}
|
||||
|
||||
// ZoneIterator manages a stream of *computepb.Zone.
|
||||
type ZoneIterator struct {
|
||||
items []*computepb.Zone
|
||||
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 []*computepb.Zone, nextPageToken string, err error)
|
||||
}
|
||||
|
||||
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
|
||||
func (it *ZoneIterator) 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 *ZoneIterator) Next() (*computepb.Zone, error) {
|
||||
var item *computepb.Zone
|
||||
if err := it.nextFunc(); err != nil {
|
||||
return item, err
|
||||
}
|
||||
item = it.items[0]
|
||||
it.items = it.items[1:]
|
||||
return item, nil
|
||||
}
|
||||
|
||||
func (it *ZoneIterator) bufLen() int {
|
||||
return len(it.items)
|
||||
}
|
||||
|
||||
func (it *ZoneIterator) takeBuf() interface{} {
|
||||
b := it.items
|
||||
it.items = nil
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
2
vendor/cloud.google.com/go/compute/internal/version.go
generated
vendored
2
vendor/cloud.google.com/go/compute/internal/version.go
generated
vendored
|
|
@ -15,4 +15,4 @@
|
|||
package internal
|
||||
|
||||
// Version is the current tagged release of the library.
|
||||
const Version = "1.23.3"
|
||||
const Version = "1.23.4"
|
||||
|
|
|
|||
80
vendor/cloud.google.com/go/internal/.repo-metadata-full.json
generated
vendored
80
vendor/cloud.google.com/go/internal/.repo-metadata-full.json
generated
vendored
|
|
@ -29,6 +29,26 @@
|
|||
"release_level": "stable",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/ai/generativelanguage/apiv1": {
|
||||
"api_shortname": "generativelanguage",
|
||||
"distribution_name": "cloud.google.com/go/ai/generativelanguage/apiv1",
|
||||
"description": "Generative Language API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/ai/latest/generativelanguage/apiv1",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/ai/generativelanguage/apiv1beta": {
|
||||
"api_shortname": "generativelanguage",
|
||||
"distribution_name": "cloud.google.com/go/ai/generativelanguage/apiv1beta",
|
||||
"description": "Generative Language API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/ai/latest/generativelanguage/apiv1beta",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/ai/generativelanguage/apiv1beta2": {
|
||||
"api_shortname": "generativelanguage",
|
||||
"distribution_name": "cloud.google.com/go/ai/generativelanguage/apiv1beta2",
|
||||
|
|
@ -179,6 +199,16 @@
|
|||
"release_level": "stable",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/apps/meet/apiv2beta": {
|
||||
"api_shortname": "meet",
|
||||
"distribution_name": "cloud.google.com/go/apps/meet/apiv2beta",
|
||||
"description": "Google Meet API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/apps/latest/meet/apiv2beta",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/area120/tables/apiv1alpha1": {
|
||||
"api_shortname": "area120tables",
|
||||
"distribution_name": "cloud.google.com/go/area120/tables/apiv1alpha1",
|
||||
|
|
@ -629,6 +659,16 @@
|
|||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/cloudquotas/apiv1": {
|
||||
"api_shortname": "cloudquotas",
|
||||
"distribution_name": "cloud.google.com/go/cloudquotas/apiv1",
|
||||
"description": "Cloud Quotas API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudquotas/latest/apiv1",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/cloudtasks/apiv2": {
|
||||
"api_shortname": "cloudtasks",
|
||||
"distribution_name": "cloud.google.com/go/cloudtasks/apiv2",
|
||||
|
|
@ -969,6 +1009,16 @@
|
|||
"release_level": "stable",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/discoveryengine/apiv1alpha": {
|
||||
"api_shortname": "discoveryengine",
|
||||
"distribution_name": "cloud.google.com/go/discoveryengine/apiv1alpha",
|
||||
"description": "Discovery Engine API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/discoveryengine/latest/apiv1alpha",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/discoveryengine/apiv1beta": {
|
||||
"api_shortname": "discoveryengine",
|
||||
"distribution_name": "cloud.google.com/go/discoveryengine/apiv1beta",
|
||||
|
|
@ -2099,6 +2149,16 @@
|
|||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/securitycentermanagement/apiv1": {
|
||||
"api_shortname": "securitycentermanagement",
|
||||
"distribution_name": "cloud.google.com/go/securitycentermanagement/apiv1",
|
||||
"description": "Security Center Management API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/securitycentermanagement/latest/apiv1",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/servicecontrol/apiv1": {
|
||||
"api_shortname": "servicecontrol",
|
||||
"distribution_name": "cloud.google.com/go/servicecontrol/apiv1",
|
||||
|
|
@ -2159,6 +2219,16 @@
|
|||
"release_level": "stable",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/shopping/css/apiv1": {
|
||||
"api_shortname": "css",
|
||||
"distribution_name": "cloud.google.com/go/shopping/css/apiv1",
|
||||
"description": "CSS API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/css/apiv1",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/shopping/merchant/inventories/apiv1beta": {
|
||||
"api_shortname": "merchantapi",
|
||||
"distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta",
|
||||
|
|
@ -2209,6 +2279,16 @@
|
|||
"release_level": "stable",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/spanner/executor/apiv1": {
|
||||
"api_shortname": "spanner-cloud-executor",
|
||||
"distribution_name": "cloud.google.com/go/spanner/executor/apiv1",
|
||||
"description": "Cloud Spanner Executor test API",
|
||||
"language": "go",
|
||||
"client_library_type": "generated",
|
||||
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/spanner/latest/executor/apiv1",
|
||||
"release_level": "preview",
|
||||
"library_type": "GAPIC_AUTO"
|
||||
},
|
||||
"cloud.google.com/go/speech/apiv1": {
|
||||
"api_shortname": "speech",
|
||||
"distribution_name": "cloud.google.com/go/speech/apiv1",
|
||||
|
|
|
|||
41
vendor/cloud.google.com/go/internal/trace/trace.go
generated
vendored
41
vendor/cloud.google.com/go/internal/trace/trace.go
generated
vendored
|
|
@ -32,16 +32,33 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
telemetryPlatformTracingOpenCensus = "opencensus"
|
||||
telemetryPlatformTracingOpenTelemetry = "opentelemetry"
|
||||
telemetryPlatformTracingVar = "GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING"
|
||||
// TelemetryPlatformTracingOpenCensus is the value to which the environment
|
||||
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
|
||||
// set to enable OpenCensus tracing.
|
||||
TelemetryPlatformTracingOpenCensus = "opencensus"
|
||||
// TelemetryPlatformTracingOpenCensus is the value to which the environment
|
||||
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
|
||||
// set to enable OpenTelemetry tracing.
|
||||
TelemetryPlatformTracingOpenTelemetry = "opentelemetry"
|
||||
// TelemetryPlatformTracingOpenCensus is the name of the environment
|
||||
// variable that can be set to change the default tracing from OpenCensus
|
||||
// to OpenTelemetry.
|
||||
TelemetryPlatformTracingVar = "GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING"
|
||||
// OpenTelemetryTracerName is the name given to the OpenTelemetry Tracer
|
||||
// when it is obtained from the OpenTelemetry TracerProvider.
|
||||
OpenTelemetryTracerName = "cloud.google.com/go"
|
||||
)
|
||||
|
||||
var (
|
||||
// TODO(chrisdsmith): Should the name of the OpenTelemetry tracer be public and mutable?
|
||||
openTelemetryTracerName string = "cloud.google.com/go"
|
||||
openTelemetryTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
|
||||
os.Getenv(telemetryPlatformTracingVar)), telemetryPlatformTracingOpenTelemetry)
|
||||
// OpenTelemetryTracingEnabled is true if the environment variable
|
||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
|
||||
// case-insensitive value "opentelemetry".
|
||||
//
|
||||
// Do not access directly. Use instead IsOpenTelemetryTracingEnabled or
|
||||
// IsOpenCensusTracingEnabled. Intended for use only in unit tests. Restore
|
||||
// original value after each test.
|
||||
OpenTelemetryTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
|
||||
os.Getenv(TelemetryPlatformTracingVar)), TelemetryPlatformTracingOpenTelemetry)
|
||||
)
|
||||
|
||||
// IsOpenCensusTracingEnabled returns true if the environment variable
|
||||
|
|
@ -55,7 +72,7 @@ func IsOpenCensusTracingEnabled() bool {
|
|||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
|
||||
// case-insensitive value "opentelemetry".
|
||||
func IsOpenTelemetryTracingEnabled() bool {
|
||||
return openTelemetryTracingEnabled
|
||||
return OpenTelemetryTracingEnabled
|
||||
}
|
||||
|
||||
// StartSpan adds a span to the trace with the given name. If IsOpenCensusTracingEnabled
|
||||
|
|
@ -63,12 +80,12 @@ func IsOpenTelemetryTracingEnabled() bool {
|
|||
// returns true, the span will be an OpenTelemetry span. Set the environment variable
|
||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
||||
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
|
||||
// The default will remain OpenCensus until [TBD], at which time the default will
|
||||
// The default will remain OpenCensus until May 29, 2024, at which time the default will
|
||||
// switch to "opentelemetry" and explicitly setting the environment variable to
|
||||
// "opencensus" will be required to continue using OpenCensus tracing.
|
||||
func StartSpan(ctx context.Context, name string) context.Context {
|
||||
if IsOpenTelemetryTracingEnabled() {
|
||||
ctx, _ = otel.GetTracerProvider().Tracer(openTelemetryTracerName).Start(ctx, name)
|
||||
ctx, _ = otel.GetTracerProvider().Tracer(OpenTelemetryTracerName).Start(ctx, name)
|
||||
} else {
|
||||
ctx, _ = trace.StartSpan(ctx, name)
|
||||
}
|
||||
|
|
@ -80,7 +97,7 @@ func StartSpan(ctx context.Context, name string) context.Context {
|
|||
// returns true, the span will be an OpenTelemetry span. Set the environment variable
|
||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
||||
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
|
||||
// The default will remain OpenCensus until [TBD], at which time the default will
|
||||
// The default will remain OpenCensus until May 29, 2024, at which time the default will
|
||||
// switch to "opentelemetry" and explicitly setting the environment variable to
|
||||
// "opencensus" will be required to continue using OpenCensus tracing.
|
||||
func EndSpan(ctx context.Context, err error) {
|
||||
|
|
@ -166,7 +183,7 @@ func httpStatusCodeToOCCode(httpStatusCode int) int32 {
|
|||
// span must be an OpenTelemetry span. Set the environment variable
|
||||
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
|
||||
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
|
||||
// The default will remain OpenCensus until [TBD], at which time the default will
|
||||
// The default will remain OpenCensus until May 29, 2024, at which time the default will
|
||||
// switch to "opentelemetry" and explicitly setting the environment variable to
|
||||
// "opencensus" will be required to continue using OpenCensus tracing.
|
||||
func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{}) {
|
||||
|
|
|
|||
13
vendor/cloud.google.com/go/storage/CHANGES.md
generated
vendored
13
vendor/cloud.google.com/go/storage/CHANGES.md
generated
vendored
|
|
@ -1,6 +1,19 @@
|
|||
# Changes
|
||||
|
||||
|
||||
## [1.37.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.36.0...storage/v1.37.0) (2024-01-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **storage:** Add maxAttempts RetryOption ([#9215](https://github.com/googleapis/google-cloud-go/issues/9215)) ([e348cc5](https://github.com/googleapis/google-cloud-go/commit/e348cc5340e127b530e8ee4664fd995e6f038b2c))
|
||||
* **storage:** Support IncludeFoldersAsPrefixes ([#9211](https://github.com/googleapis/google-cloud-go/issues/9211)) ([98c9d71](https://github.com/googleapis/google-cloud-go/commit/98c9d7157306de5134547a67c084c248484c9a51))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **storage:** Migrate deprecated proto dep ([#9232](https://github.com/googleapis/google-cloud-go/issues/9232)) ([ebbb610](https://github.com/googleapis/google-cloud-go/commit/ebbb610e0f58035fd01ad7893971382d8bbd092f)), refs [#9189](https://github.com/googleapis/google-cloud-go/issues/9189)
|
||||
|
||||
## [1.36.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.35.1...storage/v1.36.0) (2023-12-14)
|
||||
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue